Issues working with pandas dataframes after reinstallation

Viewed 328

I have reinstalled Python and Anaconda and now I face the following issue.

After I have loaded a .pkl file to a dataframe and tried to 'take a look' at the file as follows:

df = pd.read_pickle("example.pkl")
df

I get an error:

AttributeError: 'DataFrame' object has no attribute '_data'

Calling:

df.head()

delivers:

RecursionError: maximum recursion depth exceeded while calling a Python object

I have already tried to exceed the depth, but it led to a crush "Python has stopped working". I cannot remember changing the setting in the previous installation, though.

Does anyone of you know the possible solution? Best regards!

Edit: I probably should add that the file has ca 50M rows (which again has not been an issue previously).

2 Answers

I encountered the same issue, and temporarily avoid it by downgrading pandas from 1.1.0 to 1.0.3.

pip uninstall pandas
pip install pandas==1.0.3

Hope that works.

Today I encountered the same issue. Basically failed with pandas library installed with conda. After uninstalling it and re-installing with pip works fine!

Related