Pickle incompatibility between 0.25 and 1.0 when saving a MultiIndex dataframe
See original GitHub issueThis seems to have caused the problem described here:
which I’m now also experiencing. I dumped a MultiIndex dataframe containing ndarrays to a pickle on disk under pandas 0.25.x in Python 3.6, and now I’m getting:
AttributeError: Can't get attribute 'FrozenNDArray' on <module 'pandas.core.indexes.frozen'
when trying to load it in pandas 1.0.3 (still on Python 3.6). Any suggestions/workarounds? Should I instead open up a new issue?
This solved issue seems related, but is for Python 2.7:
https://github.com/pandas-dev/pandas/issues/31988
This comment in the original rationale for getting rid of FrozenNDArray
mentions pandas.compat.pickle_compat.py
, which seems relevant:
https://github.com/pandas-dev/pandas/issues/9031#issuecomment-306659873
_Originally posted by @mspacek in https://github.com/pandas-dev/pandas/pull/29335#issuecomment-628138718_
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
exactly what i said pickle.load does not handle backward compatibility never has never will
pd.read_pickle does
you should simply use pd.read_pickle