# 히스토그램 시각화
def get_hist(df):
import seaborn as sns
num_columns = len(df.columns)
rows = (num_columns // 5) + (num_columns % 5 > 0)
plt.figure(figsize=(20, rows * 5))
for i, column in enumerate(df.columns):
ax = plt.subplot(rows, 5, i + 1)
sns.histplot(df[column], kde=True)
plt.xlabel(column, fontsize=12)
plt.tight_layout()
plt.show()
get_hist(df)
'[업무 지식] > Seaborn' 카테고리의 다른 글
[scatterplot] 한번에 모든 컬럼 시각화 (0) | 2024.11.27 |
---|---|
[boxeplot] Plotting large distributions (0) | 2024.11.17 |
[FacetGrid] Overlapping densities (‘ridge plot’) (1) | 2024.11.13 |
[jointplot] Joint kernel density estimate (0) | 2024.11.13 |
[Jointgrid] Joint and marginal histograms (0) | 2024.11.13 |