Created
October 23, 2012 00:47
-
-
Save abeger/3935950 to your computer and use it in GitHub Desktop.
Read a CSV in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
f = open('mycsv.csv','r') | |
try: | |
reader = csv.reader(f) | |
for row in reader: | |
print row | |
finally: | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For reading semicolon-delimited CSV: csv.reader(f, delimiter=';')