開始使用免費開始

摘要日期資訊

你也可以在型別為 datetime64 的日期欄位上計算摘要統計量。有些摘要統計量(例如 mean)用在日期上不太合理,但有些非常實用,例如最小值與最大值,可以讓你看出資料涵蓋的時間範圍。

變數 sales 已可使用,且已將 pandas 載入為 pd

本練習屬於課程

使用 pandas 進行資料操作

檢視課程

練習說明

  • 列印 date 欄位的最大值。
  • 列印 date 欄位的最小值。

動手互動練習

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

# Print the maximum of the date column
____

# Print the minimum of the date column
____
編輯並執行程式碼