Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I typically use the following:

import csv
data=list( csv.reader(open('myfile.csv','rU')) )

The data is read into a list as strings. Then, you can convert to another data type. For example, you can convert to integers as follows:

data=map(lambda x: int(x),data)