Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Problem with the following error: Name " " is not defined

I am trying to do a scatter plot but I obtain the following error: "x and y must be the same size". Then, I check the size of the variables to see from where the problem comes.

However, when I do that, it seems that one of the variables (variable "pop") does not exist when it should exist.

I attach a picture of the problem:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

Any idea of why this is happening?

>Solution :

You haven’t defined a variable named pop, so you can’t refer to it. If it’s a column of your DataFrame, you can refer to it as city_join['pop']

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading