728x90
시각화 matplotlib, seaborn 범주형] countplot, bar chart, pie chart
seaborn countplot
# sns.countplot(x=titanic['Pclass'])
sns.countplot(x='Pclass', data=titanic)
# sns.countplot(y='Pclass', data=titanic)
plt.grid()
plt.show()
막대 그래프 시각화, plot(kind='bar')
train.groupby('Pclass').mean()['Survived'].plot(kind='bar')
pie chart
plt.pie(temp.values, labels = temp.index, autopct = '%.2f%%',
startangle=90, counterclock=False,
explode = [0.05, 0.05, 0.05], shadow=True)
plt.show()
728x90