pythonpandaspandas-profiling

ImportError: cannot import name 'ABCIndexClass' from 'pandas.core.dtypes.generic'


I have this output :

[Pandas-profiling] ImportError: cannot import name 'ABCIndexClass' from 'pandas.core.dtypes.generic'

when trying to import pandas-profiling in this fashion :

from pandas_profiling import ProfileReport

It seems to import pandas-profiling correctly but struggles when it comes to interfacing with pandas itself. Both libraries are currently up to date through conda. It doesn't seem to match any of the common problems associated with pandas-profiling as per their documentation, and I can't seem to locate a more general solution of importing the name ABCIndexClass.

Thanks


Solution

  • Thanks to the @aflyingtoaster's answer, the following workaround has worked fine for me:

    1. Edit the file "~/[your_conda_env_path]/lib/site-packages/visions/dtypes/boolean.py"
    2. Find the row "from pandas.core.dtypes.generic import ABCIndexClass, ABCSeries" and just replace ABCIndexClass for ABCIndex.
    3. Save the boolean.py file and enjoy your report!