Skip to content

Instantly share code, notes, and snippets.

@beauvais
Created October 18, 2011 18:35
Show Gist options
  • Save beauvais/1296261 to your computer and use it in GitHub Desktop.
Save beauvais/1296261 to your computer and use it in GitHub Desktop.
CSV Chopping
csvFile = csv.reader(open('thing.csv', 'rU'), delimiter=',')
header = next(csvFile)
for row in csvFile:
devStatus = row[4]
address = row[14]
commercial = row[12]
comment = row[20]
industry = row[10]
print industry
#running, I get the last field for this, how can I run this on each line?
$ python thing.py
Technology
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment