-1

I got this error message when trying to run the code: code and error message - ufunc 'isnan' not supported for the input types

The relevant dataframe is here: Relevant dataframe

The geojson file is here: https://cocl.us/sanfran_geojson

Any idea why?

Thanks in advance for your help.

ICC
  • 1
  • 1

1 Answers1

0

I finally figured out the problem. It was because I converted the "Count" column in the dataframe into comma separated format. This inadvertently set the format of the column to object rather than int64.

The choropleth function does not work with object format in the "Count" column.

I unformatted the "Count" column and consequently the format of the column reverted to int64.

It is now working.

Lesson learn: in Python format is supremely important.

Hope this helps!

ICC
  • 1
  • 1