0

在数据帧上运行 pandas-profiling 时,我看到它将索引分析为变量。注意:我的索引是唯一键(命名为 UUID)

有没有办法排除引入索引来报告?

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

ProfileReport(df, use_index=False)

4

1 回答 1

3

我同意选择use_index=FalseinProfileReport会很好很干净,它显然不存在(还)。

因此,目前我能找到排除将索引带入报告的唯一方法是在分析之前将其删除:

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

这可以完成工作。

于 2021-10-10T21:30:54.900 回答