ModuleNotFoundError: No module named 'pandas.core.indexes'
The answer by @AKX made me realise that it was probably a version problem Pandas. However, I only needed to upgrade.
pip install pandas --upgrade
I would suggest using pandas pickle method to read .pk file.
import _pickle as cPickle
with open('filename.pkl', 'rb') as fo:
dict = cPickle.load(fo, encoding='latin1’)
see doc here. Pickle Read
That smells like the pickle file has been created with a different version of Pandas, and your currently installed Pandas doesn't have the pandas.core.indexes
module that some of the data in the pickle requires.
Which version of Pandas are you using? Have you tried upgrading?
EDIT: Pandas 0.19.2 does not have that module:
$ pip install pandas==0.23.3
$ python
>>> import pandas.core.indexes as i
>>>
$ pip install pandas==0.19.2
$ python
>>> import pandas.core.indexes as i
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pandas.core.indexes'
>>>