pandas-profiling

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)


Solution

  • 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.