開始使用免費開始

用箱型圖描述時間序列資料

在分析前,你應該先探索變數的分佈。因為你正在處理時間序列,所以會用箱型圖與數值摘要來檢視其特性。提醒你,可以用下列指令將 DataFrame 的資料繪製為箱型圖:

df.boxplot(fontsize=6, vert=False)

注意這裡新加入的參數 vert,用來指定箱型圖要水平或垂直呈現。

本練習屬於課程

使用 Python 視覺化時間序列資料

檢視課程

練習說明

  • jobs 中所有時間序列繪製箱型圖。
  • 印出 jobs 中所有時間序列的數值統計摘要。
  • 檢視結果,並印出平均值最高與變異度最大(也就是標準差最高)的時間序列名稱。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Generate a boxplot
____.____(fontsize=6, vert=False)
plt.show()

# Generate numerical summaries
print(____)

# Print the name of the time series with the highest mean
print(____)

# Print the name of the time series with the highest variability
print(____)
編輯並執行程式碼