Python 3 ImportError: No module named 'pandas.core.indexes'

This error was raised when I was trying to load a dataframe from a pickle build with python 3.7 into python 3.5. Or the problem could be related to the pandas versions old version is: 0.19.2 and the new one is: pandas-0.23.4

ImportError: No module named 'pandas.core.indexes'

The solution which worked fine for me was to upgrade the version of the pandas by:

pip install --upgrade pandas

or by:

conda upgrade pandas

depending on the environment settings and python version you may need to use:

pip3 install --upgrade pandas

The second solution which is also working for me was to replace the reading of the pickle:

import pickle
pickle_off = open(r"C:\user\df.pickle","rb")
df = pickle.load(pickle_off)

with the new one (using pandas to read the pickle:

import pandas as pd

pickle_off = open(r"C:\user\df.pickle","rb")
df = pd.read_pickle(pickle_off)

Related Article