Skip to content

Instantly share code, notes, and snippets.

@myazdani
Created May 9, 2014 14:48
Show Gist options
  • Save myazdani/18135ec77016cd69e6b0 to your computer and use it in GitHub Desktop.
Save myazdani/18135ec77016cd69e6b0 to your computer and use it in GitHub Desktop.
my function for reading CSV files
import csv
def return_rows(filename, file_encoding = 'rU'):
with open(filename, file_encoding) as f:
reader = csv.reader(f)
rowsInData = [row for row in reader]
return rowsInData
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment