Reading .csv through DictReader
问题 I'm just trying to read a .csv using the first row as keys for the dictionary, with no success. My file has two lines (test), items being delimited by tabs. subjectID logID logTimestamp gameKey userID writer gameTime gameCode gameDesc 9991 1711774 6/13/14 E9E91B56 L11-13 general 358 1002 GAMESCRIBE_CREATED Code : def process_data(file_path): users = {} # Open the .csv file and creates a dict of actions with open(file_path, 'rb') as csvfile: spamreader = csv.DictReader(csvfile, delimiter='\t')