KeyError - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: KeyError (/thread-29871.html) |
KeyError - Jorgeasf85 - Sep-24-2020 Hello, I'm currently trying to learn python for career purposes. I was trying to do a few tests to my new recent skills but, unfortunately, I not even being able to pass the first phase. I'm constantly incurring in a KeyError whenever I try to call any column from my CSV file. As you can see in the image below, there is no white spaces in the columns names. I don't know what else to do. CODE PRINTSCREEN IMAGE Does anyone know why this might happen? RE: KeyError - bowlofred - Sep-24-2020 Looks to me like you've told it your separator is a tab "\t" , but in fact columns are separated by semicolons. So it's not finding the columns and you have a single column with a very long name.
RE: KeyError - buran - Sep-24-2020 Please, don't post images of code and/or traceback. Copy/paste as text and use BBcode tags. |