การสรุปค่าในข้อมูลอนุกรมเวลา

การแสดงภาพข้อมูล Time Series ด้วย Python

Thomas Vincent

Head of Data Science, Getty Images

การดึงสถิติเชิงตัวเลขจากข้อมูล

  • ค่าเฉลี่ยของข้อมูลนี้คืออะไร?
  • ค่าสูงสุดที่พบในอนุกรมเวลานี้คืออะไร?
การแสดงภาพข้อมูล Time Series ด้วย 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
การแสดงภาพข้อมูล Time Series ด้วย Python

การสรุปข้อมูลด้วย Boxplot

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()
การแสดงภาพข้อมูล Time Series ด้วย Python

Boxplot ของค่าในข้อมูล CO2

Boxplot ของอนุกรมเวลา

การแสดงภาพข้อมูล Time Series ด้วย Python

การสรุปข้อมูลด้วย Histogram

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()
การแสดงภาพข้อมูล Time Series ด้วย Python

Histogram ของค่าในข้อมูล CO2

Histogram แบบ 100 bins

การแสดงภาพข้อมูล Time Series ด้วย Python

การสรุปข้อมูลด้วย Density Plot

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()
การแสดงภาพข้อมูล Time Series ด้วย Python

Density plot ของค่าในข้อมูล CO2

Density plot ของข้อมูล

การแสดงภาพข้อมูล Time Series ด้วย Python

มาฝึกกันเถอะ!

การแสดงภาพข้อมูล Time Series ด้วย Python

Preparing Video For Download...