Created
August 30, 2012 04:35
-
-
Save lxneng/3522361 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
>>> reader = csv.reader(open('ttt.csv')) | |
>>> keys = reader.next() | |
>>> data = [dict(zip(keys, property)) for property in reader] | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That will load the whole csv into memory which will be problematic when the file is large.