python-diskcache icon indicating copy to clipboard operation
python-diskcache copied to clipboard

Bug with pandas 2.0

Open picktim opened this issue 1 year ago • 1 comments
trafficstars

I'm getting error when use disk cache with pandas 2.0 : ModuleNotFoundError: No module named 'pandas.core.indexes.numeric' at diskcache/core.py", line 282, in fetch return pickle.load(reader) It worked if i downgrade pandas to version 1.5.x, how to resolve this ?

picktim avatar May 18 '24 02:05 picktim

That's just that you've saved something with Pandas 1.5, and now that you try to load the same data with Pandas 2.0, the modules unpickling attempts to find are not there anymore.

akx avatar Jul 22 '24 18:07 akx

Pickle is not a good way to save pandas DataFrames. It is neither performant nor safe between versions. One should probably override persistence to store as Parquet or similar.

jonnor avatar Jul 17 '25 11:07 jonnor