Skip to content

Instantly share code, notes, and snippets.

@abeger
Created October 23, 2012 00:47
Show Gist options
  • Select an option

  • Save abeger/3935950 to your computer and use it in GitHub Desktop.

Select an option

Save abeger/3935950 to your computer and use it in GitHub Desktop.
Read a CSV in Python
import csv
f = open('mycsv.csv','r')
try:
reader = csv.reader(f)
for row in reader:
print row
finally:
f.close()
@abeger
Copy link
Copy Markdown
Author

abeger commented Oct 28, 2012

For reading semicolon-delimited CSV: csv.reader(f, delimiter=';')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment