mthh / jenkspy

Compute Natural Breaks in Python (Fisher-Jenks algorithm)

Home Page:https://pypi.python.org/pypi/jenkspy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KeyError: 20

iptriant opened this issue · comments

Hi everyone. I am trying to get the natural breaks of a geodataframe column. Even though the data type is float64, I am getting a KeyError: 20. Does anyone know what might be wrong ? Thanks in advance

error

jenkspy.jenks_breaks does not natively support pandas.Series.
You should transform your values into a numpy array first, using the to_numpy method (with something like buurten_perfomance['A_obstacle'].to_numpy()).

Hope this helps. Don't hesitate to tell me if you still have a problem.

jenkspy.jenks_breaks does not natively support pandas.Series. You should transform your values into a numpy array first, using the to_numpy method (with something like buurten_perfomance['A_obstacle'].to_numpy()).

Hope this helps. Don't hesitate to tell me if you still have a problem.

This helped me automate a very annoying report at work, so thank you very much for this.