In Pandas, I am doing:
bp = p_df.groupby(\'class\').plot(kind=\'kde\')
p_df is a dataframe object.
p_df
dataframe
Howeve
Maybe you can try this:
fig, ax = plt.subplots(figsize=(10,8)) classes = list(df.class.unique()) for c in classes: df2 = data.loc[data['class'] == c] df2.vals.plot(kind="kde", ax=ax, label=c) plt.legend()