csv with keys code example
Example: how to extract keys from dictreader python
>>> import csv
>>> with open('test.csv') as f:
reader = csv.DictReader(f)
print reader.fieldnames
['first_name', 'last_name', 'email', 'mobile']
>>> import csv
>>> with open('test.csv') as f:
reader = csv.DictReader(f)
print reader.fieldnames
['first_name', 'last_name', 'email', 'mobile']