Pandas-profiling 错误 AttributeError: 'DataFrame' object has no attribute 'profile_report'

新手上路,请多包涵

我想使用 pandas-profiling 在数据集上做一些 eda 但我收到一个错误:AttributeError: ‘DataFrame’ object has no attribute ‘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’

原文由 Adhish 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 1.1k
1 个回答

df.profile_report() 入口点从 v2.0.0 开始可用。 从这里解决

您是否通过 pip 或 conda 安装了 pandas-profiling?

使用: pip install -U pandas-profiling 解决这个问题并重新启动你的内核

原文由 RobinKiplangat 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进