result = df_fashion.pivot_table(index="국가(대륙)별", columns="연도", values="백만원", aggfunc="sum")
result

Untitled

aggfunc 지정하지 않으면 기본 값인 mean으로 출력된다.

sns.heatmap(result, cmap = "Blues_r")

Untitled

cmap 옵션으로 색상 변경

annot 옵션으로 수치를 표시

sns.heatmap(result, cmap = "Blues_r", annot=True)

Untitled

plt.figure(figsize=(10, 6))
sns.heatmap(result, cmap="Blues_r", annot=True, fmt=".0f")

Untitled

중국에서 구매액이 가장 많다.

미국, 일본에서 구매액이 증가하고 있다.