머신러닝2 EDA3
📝 강의안에서 사용한 distplot이 'distplot' is a deprecated function and will be removed in a future version.으로 떠서 hisplot을 이용해 시각화를 해 보았다.
fig, axes = plt.subplots(nrows=1, ncols=2, figsize=(14,6))
women = titanic[titanic['sex']=='female']
men = titanic[titanic['sex']=='male']
ax = sns.histplot(data=women, x='age', bins=20, hue='survived', ax=axes[0])
ax.set_title('Female');
ax = sns.histplot(data=men, x='age', bins=40, hue='survived', ax=axes[1])
ax.set_title('Male');

hisplot 참고: https://blog.naver.com/PostView.naver?blogId=janghanui&logNo=222414645380&parentCategoryNo=&categoryNo=&viewDate=&isShowPopularPosts=false&from=postView