tushman.io

The musings of an insecure technologist

Working With CSVs in Python

I have googled this like 8 times in the last 8 months, and never satisfied with my results:

1
2
3
4
5
import csv
with open('data/searches.csv','rb') as csvfile:
    csv_reader = csv.DictReader(csvfile)
    for row in csv_reader:
        print row['name']

Comments