Skip to content

Instantly share code, notes, and snippets.

@Omer80
Created February 9, 2013 10:40
Show Gist options
  • Save Omer80/4744821 to your computer and use it in GitHub Desktop.
Save Omer80/4744821 to your computer and use it in GitHub Desktop.
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')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment