This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients eorochena, eric.smith, steven.daprano
Date 2018-12-31.20:34:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1546288456.36.0.936652677756.issue35626@roundup.psfhosted.org>
In-reply-to
Content
Steven is correct: your problem is that in the first example you're reading the header row before you pass the file to DictReader, so the DictReader cannot know what your columns are named. (Actually, your code uses the second row of your file as the column names: you should have been able to determine this by looking at the value of "row" that was printed).

I'm going to close this issue. Please do some more investigation. If you can produce a short example that we can execute ourselves, including any needed data files, and you think it still shows an error, please feel free to reopen this issue.
History
Date User Action Args
2018-12-31 20:34:18eric.smithsetrecipients: + eric.smith, steven.daprano, eorochena
2018-12-31 20:34:16eric.smithsetmessageid: <1546288456.36.0.936652677756.issue35626@roundup.psfhosted.org>
2018-12-31 20:34:16eric.smithlinkissue35626 messages
2018-12-31 20:34:16eric.smithcreate