Created
November 5, 2015 21:12
-
-
Save natereed/1778482b9797e2489014 to your computer and use it in GitHub Desktop.
Read the headers of a csv file into fieldnames for reading with csv.DictReader
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
def read_fieldnames(path): | |
with open(path, "r") as path_csv: | |
reader = csv.reader(path_csv) | |
row = reader.next() | |
return row |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment