不要在 pandas-profiling 中使用索引

don't use index in pandas-profiling

当 运行 pandas 对数据框进行分析时,我看到它将索引分析为一个变量。注意:我的索引是唯一键(命名为UUID)

有没有办法排除带入索引上报?

我知道我可以在 pandas 中删除它,但在我的脑海中我想这样做

ProfileReport(df, use_index=False)

我同意在 ProfileReport 中选择 use_index=False 会很干净,它显然还不存在。

所以目前我能找到排除将索引带入报告的唯一方法是在分析之前删除它:

df.reset_index(drop=True, inplace=True)

这就完成了工作。