Error “unknown property denSity”

I have been doing pro data scientist path and have accomplished 95%.
I am stucked in Visualizing categorical data - Introduction to bar charts - Unknown property error.
Can any one help please???
my code:
import codecademylib3

import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

add in your answers here!

left_plot = “Bar Chart”

right_plot =“Histogram”

heroes_data = pd.read_csv(“heroes_information.csv”)

line of code used to clean up messy data

heroes_data_cleaned = heroes_data[heroes_data.Alignment != “-”]

code for left plot

plt.subplot(1, 2, 1)

sns.countplot(heroes_data_cleaned[“Alignment”])

code for right plot

plt.subplot(1, 2, 2)

sns.distplot(heroes_data_cleaned[“Height”], kde=False)

plt.xlim(0,500)

plt.show()

Error details in output:

Traceback (most recent call last):
File “plot.py”, line 20, in
sns.distplot(heroes_data_cleaned[“Height”], kde=False)
File “/usr/local/lib/python3.6/dist-packages/seaborn/distributions.py”, line 2619, in distplot
color=hist_color, **hist_kws)
File “/usr/local/lib/python3.6/dist-packages/matplotlib/init.py”, line 1898, in inner
return func(ax, *args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/matplotlib/axes/_axes.py”, line 6389, in hist
p.update(kwargs)
File “/usr/local/lib/python3.6/dist-packages/matplotlib/artist.py”, line 885, in update
for k, v in props.items()]
File “/usr/local/lib/python3.6/dist-packages/matplotlib/artist.py”, line 885, in

Could you please check the FAQ at the given link and follow the guidance on formatting code and linking to the project/lesson in question. It’s hard for others to assist without this.

I just created a ticket and reported this bug.

See this other thread:

1 Like

Thank you very much for such efficient response.

It worked.

Regards

2 Likes