我想使用pandas分析在数据集上执行一些eda操作,但是我得到了一个错误: AttributeError:'DataFrame‘对象没有属性'profile_report’
我已经用以下代码在spyder上创建了一个python脚本:
import pandas as pd import pandas_profiling data_abc = pd.read_csv('abc.csv') profile = data_abc.profile_report(title='Pandas Profiling Report') profile.to_file(output_file="abc_pandas_profiling.html")
AttributeError:“DataFrame”对象没有特性“”profile_report“”
发布于 2019-11-26 14:15:38
df.profile_report()入口点从v2.0.0开始可用。soln from here
你是通过pip还是conda安装pandas-profiling的?
使用:pip install -U pandas-profiling解决这个问题并重新启动内核
发布于 2019-08-28 23:13:23
问题是团队还没有更新pip或conda安装(描述为here)。如果您是使用其中之一进行安装的,请暂时尝试一下。
profile = pandas_profiling.ProfileReport(df)
print(profile)发布于 2020-10-16 22:35:03
对于那些使用google colabs的用户,分析库已经过时了,因此请使用下面的命令并重新启动运行时
! pip install https://github.com/pandas-profiling/pandas-profiling/archive/master.zip https://stackoverflow.com/questions/57193292
复制相似问题