我想使用 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 许可协议
df.profile_report()
入口点从 v2.0.0 开始可用。 从这里解决您是否通过 pip 或 conda 安装了 pandas-profiling?
使用:
pip install -U pandas-profiling
解决这个问题并重新启动你的内核