barplot
plt.figure(figsize=(12,8))
sns.barplot(data = df, x="연도", y="평당분양가격")

pointplot
plt.figure(figsize=(12,8))
sns.pointplot(data = df, x="연도", y="평당분양가격")

boxplot
plt.figure(figsize=(12,8))
sns.boxplot(data = df, x="연도", y="평당분양가격")

violinplot
plt.figure(figsize=(12,8))
sns.violinplot(data = df, x="연도", y="평당분양가격")

swarmplot
plt.figure(figsize=(12,8))
sns.swarmplot(data = df, x="연도", y="평당분양가격")

catplot: 서브플롯 그리기
sns.catplot(data=df[~df.index.duplicated()], x="연도", y="평당분양가격", col="지역명", col_wrap=4, kind="point", ci=None)

plt.figure(figsize=(15, 6))
sns.countplot(data = df, x = "월")
판다스로는 아래와 같이 그릴 수 있다.
df["월"].value_counts().sort_index().plot(kind="bar", rot=0)

연령대별, 성별 처방수를 출력하려면 seaborn의 hue를 사용한다.
plt.figure(figsize=(20, 6))
sns.countplot(data = df.sort_values("연령대코드(5세단위)"), x = "연령대", hue="성별")

| [머신러닝] INTRO. Definition, Tool, 알고리즘 유형 (0) | 2022.11.17 |
|---|---|
| 시각화 총정리: plotly (1) | 2022.10.28 |
| Boolean Indexing (0) | 2022.10.28 |
| [데이터 집계] pd.crosstab, pivot table, group by (0) | 2022.10.28 |
| 빈 날짜 채우기, 누적 합 구하기 (0) | 2022.10.28 |