Ray Bell
Ray Bell

Reputation: 1618

don't use index in pandas-profiling

When running pandas-profiling on a dataframe I see it analyses the index as a variable. Note: My index is a unique key (named UUID)

Is there a way to exclude bringing in the index to report?

I understand I could remove it in pandas but in my head I would like to do

ProfileReport(df, use_index=False)

Upvotes: 2

Views: 1533

Answers (1)

Evan
Evan

Reputation: 358

I agree that having an option to use_index=False in ProfileReport would be nice and clean, it apparently doesn't exist (yet).

So currently the only way I can find to exclude bringing the index into the report is by dropping it before profiling:

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

This gets the job done.

Upvotes: 6

Related Questions