Python Forum
Python 3.10 not happy with Pandas and PyPlot? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python 3.10 not happy with Pandas and PyPlot? (/thread-36491.html)



Python 3.10 not happy with Pandas and PyPlot? - Danno - Feb-25-2022

Hi. I've been using the V3.10 of Python. I've been having all sorts of weird errors. The latest is "'NoneType' object is not callable." Given that columns are available in the dataframe I'm working with and that all rows have values, this is not rational.

This evening, I found this comment in Stackoverflow (https://stackoverflow.com/questions/70232617/heatmap-error-nonetype-object-is-not-callable-when-using-with-dataframe):
Quote:Use Python 3.9 (or 3.8, 3.7, 3.6) as it seems like both pandas and plt are not quite ready to be used with Python 3.10

Has anyone else encountered this with 3.10?

Thanks,

Dan.


RE: Python 3.10 not happy with Pandas and PyPlot? - Danno - Feb-26-2022

(Feb-25-2022, 05:39 AM)Danno Wrote: Hi. I've been using the V3.10 of Python. I've been having all sorts of weird errors. The latest is "'NoneType' object is not callable." Given that columns are available in the dataframe I'm working with and that all rows have values, this is not rational.

This evening, I found this comment in Stackoverflow (https://stackoverflow.com/questions/70232617/heatmap-error-nonetype-object-is-not-callable-when-using-with-dataframe):
Quote:Use Python 3.9 (or 3.8, 3.7, 3.6) as it seems like both pandas and plt are not quite ready to be used with Python 3.10

Has anyone else encountered this with 3.10?

Thanks,

Dan.
I ripped out 3.10 and installed 3.9. That resolved the problem. It looks like 3.10 has a problem with Pandas. At least on a MacBook Pro Max M1.

df_cur['Datetime_Ordinal'] = ((df_cur['DateAndTime'] - np.datetime64('1970-01-01 00:00:00')) / np.timedelta64(1, 'm')).astype('int64')
Since I copied this code from another source, I'm not sure if it's giving the correct answer. That said, at least it does not throw an error in 3.9, unlike 3.10 where it DOES throw an error. Now I keep working to determine if the result is correct.

Hopefully this error will be resolved in the future.

Regards,

Dan.