Pandas Profiling KeyError

Viewed 1154

When running below code, running into error KeyError: 'Requested level (var1) does not match index name (None)'. I used python=3.7, jupyterlab=2.1.4, pandas-profiling=2.8. I tried to install previous pandas-profiling versions. But had the same error. I'd appreciate if anyone has any idea what went wrong.

import numpy as np
import pandas as pd
from pandas_profiling import ProfileReport

df = pd.DataFrame(
    np.random.rand(100, 5),
    columns=["a", "b", "c", "d", "e"]
)

ProfileReport(df)

See below snippet for detailed error message:

Detailed error message

1 Answers

That problem disappeared after I upgraded pandas profiling to the latest version.

pandas-profiling (2.3.0) -> Latest: 2.8.0

Related