使用 pandas 运行分析报告时出错,给出错误“TypeError:describe_boolean_1d() 获得意外的关键字参数 'title'”

MAF*_*MAF 5 pandas

我正在使用下面的代码

profile = ProfileReport(df, title='Pandas Profiling Report', html={'style':{'full_width':True}})
Run Code Online (Sandbox Code Playgroud)

运行配置文件报告但出现此错误

"TypeError: describe_boolean_1d() got an unexpected keyword argument 'title'"
Run Code Online (Sandbox Code Playgroud)

当我删除标题时,出现此错误

"TypeError: describe_boolean_1d() got an unexpected keyword argument 'html'"
Run Code Online (Sandbox Code Playgroud)

小智 3

我的机器上有 conda,所以首先尝试使用 conda 安装 pandas-profiling,但出现了与您相同的错误。

我已经删除了它:conda remove pandas-profiling 然后用 pip 重新安装它:pip install pandas-profiling[notebook,html]

而且效果很好。

注意:可视化在 EDGE 浏览器上不起作用,Chrome 可以。

最好的,维克多