Skip to content

Instantly share code, notes, and snippets.

@cigrainger
Created April 17, 2014 12:30
Show Gist options
  • Select an option

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

Select an option

Save cigrainger/10979619 to your computer and use it in GitHub Desktop.
with open("C:\Users\graingec\spillovers\\abstracts\orbis_patents_abstracts.csv","rb") as f:
with open("C:\Users\graingec\spillovers\\abstracts\\abstracts.csv","w") as f2:
f2.truncate()
for line in f:
y = line.split(',',1)
if len(y)==2:
c = y[1].replace(',','')
f2.write(y[0]+','+c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment