Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+12 votes

Anyone know what this error (listed below) is and how to fix it?

Type Error: '>' not supported between instances of 'str' and 'int'

I was working with geopandas for my individual project, and pulling data from a dataframe which appears to only have numbers in it and there is no ">" symbol anywhere in the dataframe. The data looks fine if exported to a csv as well.

asked in DATA360_Spring2019 by (1 point)

1 Answer

+8 votes

Hmm... any chance you are trying to sort by a column that contains both strings and integers? That would cause a comparison to happen. Or... well, something in your code probably needs to be changed from a string to an integer, or vice versa. Not sure what without seeing more of the code...

answered by (508 points)