0

I have data like this:

My data frame cleaned

I want to make histogram in numerical feature and this is my code:

numerical_features = ['MonthlyCharges','TotalCharges','tenure']
fig, ax = plt.subplots(1, 3, figsize=(15, 6))
# Use the following code to plot two overlays of histogram per each numerical_features, use a color 
of blue and orange, respectively
cleaned_df[cleaned_df.Churn == 'No'][numerical_features].hist(bins=20, color='blue', alpha=0.5, ax=ax)
cleaned_df[cleaned_df.Churn == 'Yes'][numerical_features].hist(bins=20, color='orange', alpha=0.5, ax=ax)
plt.show()

but i got error like this:

.... FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison res_values = method(rvalues)

how can fix it?

uud
  • 19
  • 1
  • 11
  • Did you try to google your warning message? Please don't write *"i got error like this"* when you only got a warning message. – JohanC Jul 25 '20 at 07:18
  • Does this answer your question? [FutureWarning: elementwise comparison failed; returning scalar, but in the future will perform elementwise comparison](https://stackoverflow.com/questions/40659212/futurewarning-elementwise-comparison-failed-returning-scalar-but-in-the-futur) – JohanC Jul 25 '20 at 07:20

0 Answers0