3
votes

I have just upgraded python and I cannot get pandas to run properly, please see below. Nothing appears to work.

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tqdm/_tqdm.py", line 613, in pandas from pandas.core.groupby.groupby import DataFrameGroupBy, \ ImportError: cannot import name 'DataFrameGroupBy' from 'pandas.core.groupby.groupby' (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pandas/core/groupby/groupby.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "code/analysis/get_cost_matrix.py", line 23, in tqdm.pandas() # Gives us nice progress bars File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tqdm/_tqdm.py", line 616, in pandas from pandas.core.groupby import DataFrameGroupBy, \ ImportError: cannot import name 'PanelGroupBy' from 'pandas.core.groupby' (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pandas/core/groupby/init.py)

2

2 Answers

3
votes

I guess you are using an older version of tqdm. Try using a version above tqdm>=4.23.4.

The command using pip would be,

pip install tqdm --upgrade

0
votes

The problem is with the 0.25.1 version of pandas. Consider downgrading it to 0.24.0. For more information read this

pip install --upgrade pandas==0.24.0