I'm trying to plot data based on values in two to three other columns. The below code works if I take out & df[df.Age > 50]
. Is there a way to adjust the code to work? Thank you!
plt.figure(figsize = (15, 5))
plt.title(f"KDE Plot:", fontsize = 30, fontweight = 'bold')
ax = sns.kdeplot(
df[df.OpenedLCInd== 1 ] & df[df.Age > 50]['APlusCreditTier'].dropna(),
label = 'Opened Letter Check',
lw = 2,
legend = True
)
plt.legend = True
ax1 = sns.kdeplot(
df[df.OpenedLCInd == 0]['APlusCreditTier'].dropna(),
label = 'No Open Letter Check',
lw = 2, legend = True
)
plt.tight_layout()