Skip to content

Instantly share code, notes, and snippets.

@Omer80
Omer80 / gist:4744821
Created February 9, 2013 10:40
How can I read a csv file using csv.DictReader into a dict type variable?
def data_acquisition(file_name):
data = csv.DictReader(open(str(file_name)), fieldnames=None, restkey=None, restval=None, dialect='excel')