【发布时间】:2020-11-03 13:55:32
【问题描述】:
在数据框上运行 pandas-profiling 时,我看到它会将索引作为变量进行分析。注意:我的索引是唯一键(命名为 UUID)
有没有办法排除引入索引来报告?
我知道我可以在 pandas 中删除它,但我想这样做
ProfileReport(df, use_index=False)
【问题讨论】:
标签: pandas-profiling
在数据框上运行 pandas-profiling 时,我看到它会将索引作为变量进行分析。注意:我的索引是唯一键(命名为 UUID)
有没有办法排除引入索引来报告?
我知道我可以在 pandas 中删除它,但我想这样做
ProfileReport(df, use_index=False)
【问题讨论】:
标签: pandas-profiling
我同意在ProfileReport 中选择use_index=False 会很干净,但它显然不存在(目前)。
所以目前我能找到排除将索引带入报告的唯一方法是在分析之前将其删除:
df.reset_index(drop=True, inplace=True)
这样就完成了工作。