여러 시계열 시각화

Python으로 시계열 데이터 시각화

Thomas Vincent

Head of Data Science, Getty Images

명확성이 핵심

이 플롯에서 기본 matplotlib 색상 체계는 beefturkey 시계열에 동일한 색상을 적용합니다.

matplotlib의 색상 순환

Python으로 시계열 데이터 시각화

colormap 인수

ax = df.plot(colormap='Dark2', figsize=(14, 7))
ax.set_xlabel('Date')
ax.set_ylabel('Production Volume (in tons)')

plt.show()

사용 가능한 전체 컬러맵 목록은 여기를 참조하십시오.

Python으로 시계열 데이터 시각화

colormap 인수로 선 색상 변경

시계열 시각화의 색상 체계 변경

Python으로 시계열 데이터 시각화

플롯에 정보 추가하기

ax = df.plot(colormap='Dark2', figsize=(14, 7))

df_summary = df.describe() # Specify values of cells in the table ax.table(cellText=df_summary.values, # Specify width of the table colWidths=[0.3]*len(df.columns), # Specify row labels rowLabels=df_summary.index, # Specify column labels colLabels=df_summary.columns, # Specify location of the table loc='top') plt.show()
Python으로 시계열 데이터 시각화

플롯에 통계 요약 추가

플롯에 통계 요약 추가

Python으로 시계열 데이터 시각화

척도 차이 처리

소고기와 송아지 고기의 시계열

Python으로 시계열 데이터 시각화

송아지 고기만 표시

송아지 고기만의 시계열

Python으로 시계열 데이터 시각화

패싯 플롯

df.plot(subplots=True,
                linewidth=0.5,
                layout=(2, 4),
                figsize=(16, 10),
                sharex=False,
                sharey=False)

plt.show()
Python으로 시계열 데이터 시각화

패싯 플롯

Python으로 시계열 데이터 시각화

실습할 시간입니다!

Python으로 시계열 데이터 시각화

Preparing Video For Download...