Why I'm getting different outputs for the following lines of code. (KDEplot visualisation)

40 Views Asked by At

enter image description here

enter image description here

1.

Tot=sns.kdeplot(data=new_df_dummies, x=new_df_dummies.TotalCharges[new_df_dummies["Churn"]== 1], fill = True, color = 'blue')
Tot=sns.kdeplot(data=new_df_dummies, x=new_df_dummies.TotalCharges[new_df_dummies["Churn"]== 0], fill = True, color = 'red')

and 3.

Tot=sns.kdeplot(data=new_df_dummies, x=new_df_dummies.TotalCharges, hue="Churn", fill =True)

Shouldn't the lines 1 and 2 give the same output as line 3??

0

There are 0 best solutions below