here is the dataset: https://www.kaggle.com/emilianito/saheart
here is the question: compare the distribution of tobbaco consumption for persons having CHD and not having CHD. can you interpret the effect of tobbaco consumption on having coronary heart disease?
here is what i tried:
sn.distplot(sa_heart_df[sa_heart_df['chd'] == 'No'],
['tobbaco'],
color = 'y',
label = 'No')
sn.distplot(sa_heart_df[sa_heart_df['chd'] == 'Si'],
['tobbaco'],
color = 'r',
label = 'Si')
plt.legend();
the error is:
usr/local/lib/python3.7/dist-packages/seaborn/distributions.py:2619: FutureWarning:
distplot is a deprecated function and will be removed in a future version. Please
adapt your code to use either displot (a figure-level function with similar
flexibility) or histplot (an axes-level function for histograms).
warnings.warn(msg, FutureWarning)
ValueError Traceback (most recent call last)
<ipython-input-28-44d824301cf1> in <module>()
2 ['tobbaco'],
3 color = 'y',
----> 4 label = 'No') 5 6 sn.distplot(sa_heart_df[sa_heart_df['chd'] == 'Si'],

