Created
May 9, 2014 14:48
-
-
Save myazdani/18135ec77016cd69e6b0 to your computer and use it in GitHub Desktop.
my function for reading CSV files
This file contains 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 | |
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