Key error in pandas dataframe


I’m getting this error " pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: ‘column’ " and unable to plot any chart, even I’m following Codecademy instructions.

That error suggests that there’s no column named “column” within your dataframe. Consider what columns are included in your csv file and make sure you’re using a valid key.

Please could you also have a look at the following FAQ which describes the best way to set up a question for the forums (a more helpful title, a link to the lesson and a little categorisation makes it much easier for those trying to help out and anyone who was the same issue in the future).

1 Like

you could also use the .columns method to see the column names in a pandas df.

1 Like