我正在尝试导入pandas profiling。
import pandas as pd
!pip install pandas_profiling
import pandas_profiling as pp
然而,出现了一个错误信息,说无法从pandas_profiling.report导入名称为to_html的内容。
我正在尝试导入pandas profiling。
import pandas as pd
!pip install pandas_profiling
import pandas_profiling as pp
我使用pip时遇到了相同的错误,但是在使用conda install后它像魔法一样运行良好
conda install -c conda-forge pandas-profiling
以上解决方案在我的情况下无法正常工作
请在您的Anaconda提示符上使用此命令
conda env create -n pandas-profiling
conda activate pandas-profiling
conda install -c conda-forge pandas-profiling
然后您可以在您的编辑器上使用性能报告
from pandas_profiling import ProfileReport
它肯定会工作