import csv
filename = "onedirectionsearch.csv" with open(filename, \'r\') as csvfile: csvreader = csv.DictReader(csvfile) #creating a reader using DictReade