시계열 데이터 값 요약

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

Thomas Vincent

Head of Data Science, Getty Images

데이터의 수치 요약 구하기

  • 이 데이터의 평균값은 무엇입니까?
  • 이 시계열에서 관측된 최댓값은 무엇입니까?
Python으로 시계열 데이터 시각화

.describe() 메서드는 DataFrame의 모든 수치형 열에 대한 주요 통계를 자동으로 계산합니다.

print(df.describe())
               co2
count  2284.000000
mean    339.657750
std      17.100899
min     313.000000
25%     323.975000
50%     337.700000
75%     354.500000
max     373.900000
Python으로 시계열 데이터 시각화

박스플롯으로 데이터 요약하기

ax1 = df.boxplot()
ax1.set_xlabel('Your first boxplot')
ax1.set_ylabel('Values of your data')
ax1.set_title('Boxplot values of your data')

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

CO2 데이터 값의 박스플롯

시계열 데이터의 박스플롯

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

히스토그램으로 데이터 요약하기

ax2 = df.plot(kind='hist', bins=100)
ax2.set_xlabel('Your first histogram')
ax2.set_ylabel('Frequency of values in your data')
ax2.set_title('Histogram of your data with 100 bins')

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

CO2 데이터 값의 히스토그램

100개 구간의 히스토그램

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

밀도 플롯으로 데이터 요약하기

ax3 = df.plot(kind='density', linewidth=2)
ax3.set_xlabel('Your first density plot')
ax3.set_ylabel('Density values of your data')
ax3.set_title('Density plot of your data')

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

CO2 데이터 값의 밀도 플롯

데이터의 밀도 플롯

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

연습해 봅시다!

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

Preparing Video For Download...