Skip to content

Instantly share code, notes, and snippets.

@robballou
Created January 28, 2016 18:31
Show Gist options
  • Save robballou/c8377560cbe6fe814b14 to your computer and use it in GitHub Desktop.
Save robballou/c8377560cbe6fe814b14 to your computer and use it in GitHub Desktop.
Output the CSV header row items
#!/usr/bin/env python
import csv
with open('example.csv', 'rb') as original_file:
data = csv.reader(original_file)
for row in data:
for item in row:
print "%s" % item
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment