Skip to content

Instantly share code, notes, and snippets.

@cigrainger
Created February 24, 2014 14:59
Show Gist options
  • Select an option

  • Save cigrainger/9189839 to your computer and use it in GitHub Desktop.

Select an option

Save cigrainger/9189839 to your computer and use it in GitHub Desktop.
import sys
f = open('/Users/cigrainger/Documents/spillovers/tech_proximity2/orbis_patents_titles.csv','r')
f2 = open('/Users/cigrainger/Documents/spillovers/tech_proximity2/patenttitles.csv','w')
f2.truncate()
for line in f:
y = line.split(',',1)
if len(y)==2:
c = y[1].replace(',','')
f2.write(y[0]+','+c)
f.close()
f2.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment