contexts
Doing EDA analysis and want to automate the one-click EDA process using pandas-profling's integrated tools.
And pandas-profiling is a python wrapped library that can use DataFrame to automatically generate a detailed report of the data and can automatically generate web pages for visualization.
However, there is always a gap between the ideal and the reality, this process has a lot of error, the main reason is that the version of pandas-profiling and the environment is not compatible with the result, I would like to write this article into the error and the solution for your reference.
[Pandas-profiling] ImportError: cannot import name ‘ABCIndexClass’ from ‘’
This is the first error reported after installation and occurs with the import pandas statement.
After some research, it was found that the problem is due to the fact that pip installs the latest version of pandas-profiling, however:
Pandas v1.3 renamed the ABCIndexClass to ABCIndex.
The visions dependency of the pandas-profiling package hasn’t caught up yet, and so throws an error when it can’t find ABCIndexClass.
That is, pandas has been upgraded, but pandas-profiling has not been upgraded, and the same class in both of them has different class names that don't match up, so this error occurs.
method settle an issue
Downgrading pandas to the 1. series will resolve the issue.
I reinstalled the 1.2.0 version of the pandas-profiling package
module ‘’ has no attribute ‘is_numeric_dtype’
At this time, import pandas-profiling will not show any more errors, but the report=ProfilieReport(df) step will show a new error.
After research, the problem was found to be due to:
.is_numeric_dtype was removed in 0.23.
Overall it's still too high a version of pandas, and there are two solutions:
- One is to downgrade pandas to 0.22
- The other is to reconfigure pandas yourself (not recommended).
coding
from pandas_profiling import ProfileReport report=ProfileReport(df) report.to_file(output_file='')
summarize
The above is a personal experience, I hope it can give you a reference, and I hope you can support me more.