Can't find a mistake

Hey everyone! I’m doing projects in the Data Science Visualization specialization and I’ve just finished Sea Level Project. However, when I copied my code (which works perfectly fine on to PyCharm I got this mistake:

Can somebody please help me to understand what’s wrong?

We’re going to need to see your code to be able to help.

will the link be good?

That would be helpful. Also, I’d check that your copy-paste maintained the formatting.

Formatting you mean spaces in def? This is same

I would guess that your CSV is not being read in the same way on PyCharm.

Is your CSV identical? Is the dataframe reading the header correctly? Does it help if you change



1 Like

Thank you so much! I didn’t even think about looking at the csv file. Basically, my Year column was different (it had a date instead of just year), so i did:
and now everything works.
Thanks again! :smile:

1 Like