运行 Pandas Profile Report 时出错

jlb*_*han 6 python pandas pandas-profiling

我正在尝试在 conda Jupyter NB 中运行 EDA 的配置文件报告,但不断收到错误消息。
到目前为止,这是我的代码:

    import pandas_profiling
    from pandas_profiling import ProfileReport

    profile = ProfileReport(data)
Run Code Online (Sandbox Code Playgroud)

    profile = pandas_profiling.ProfileReport(data)
Run Code Online (Sandbox Code Playgroud)

两者都产生:

类型错误:concat() 得到了一个意外的关键字参数“join_axes”

研究建议升级到我正在使用的 Pandas 1.0。

也试过

    data.profile_report()        
Run Code Online (Sandbox Code Playgroud)

AttributeError: 'DataFrame' 对象没有属性 'profile_report'

关于我哪里出错的任何提示?

附录……所以我终于想通了。需要在 conda 中安装最新版本的 pandas-profiling,即 202003 版本。太容易了。

小智 5

首先,我尝试只运行命令 !pip install pandas-profiling 但仍然无法正常工作,但后来我发现了这个!pip install pandas-profiling==2.7.1 命令,现在它对我有用。


jlb*_*han 4

在 conda 中安装了最新版本(2020 年 3 月)的 pandas-profiling。

conda install -c conda-forge/label/cf202003 pandas-profiling
Run Code Online (Sandbox Code Playgroud)

然后能够import pandas_profiling在jupyter笔记本中