9

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

    import pandas_profiling
    from pandas_profiling import ProfileReport

    profile = ProfileReport(data)

    profile = pandas_profiling.ProfileReport(data)

两者都产生:

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

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

也试过

    data.profile_report()        

AttributeError:“DataFrame”对象没有属性“profile_report”

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

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

4

7 回答 7

7

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

于 2020-07-20T20:34:48.450 回答
3

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

conda install -c conda-forge/label/cf202003 pandas-profiling

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

于 2020-04-25T22:41:24.523 回答
2

这也适用于最新版本的 pandas 分析。

发布日期 - 2020 年 4 月 14 日。

找到安装相同的链接。

https://pypi.org/project/pandas-profiling/

于 2020-04-24T14:34:49.947 回答
2

也遇到了同样的问题。我升级使用 pip3 install pandas_profiling --upgrade

于 2020-08-30T10:39:41.810 回答
2

#update 先分析到最新版本

import sys
!{sys.executable} -m pip install -U pandas-profiling[notebook]
!jupyter nbextension enable --py widgetsnbextension

import pandas as pd
from pandas_profiling import ProfileReport

train = pd.read_csv("train.csv")

#生成配置文件报告

report = ProfileReport(train)

print(repr(report.report))

report.to_widgets()
于 2021-04-16T08:10:36.083 回答
1

我认为问题通常与以前版本的 Pandas-Profiling 相关,请尝试将其升级到较新版本

如果您使用的是谷歌协作 !pip3 install pandas_profiling --upgrade

否则使用 $ pip3 install pandas_profiling --upgrade

执行此重新启动运行时后

于 2021-05-23T10:30:10.613 回答
-2

执行以下命令,完成后重新启动运行时

!pip install pandas-profiling==2.7.1 
于 2021-02-11T04:50:04.160 回答