I want to build two very similar dictionaries from the same csv file (one mapping row[0] to row[5], one from row[0] to row[6]. For some reason, I can only build one. Whichever of these two lines I run first, the dictionary exists and does exactly what I want. The other is empty. No idea what's going wrong.
mydict = {row[0]:row[5] for row in csv.reader(g)}
mydict1 = {row[0]:row[6] for row in csv.reader(g)}
I am using python 3, and tried changing the dictionary name and a few other things.