數值資料還是……?
在這個練習,以及本章接下來的內容中,你會使用舊金山的單車共乘資料 ride_sharing。其中包含起訖站、行程時間,還有單車共享服務的部分使用者資訊。
user_type 欄位表示使用者是否為免費騎乘,數值對應如下:
1代表免費騎乘。2代表單次付費。3代表月訂閱。
在這裡,你將使用 .info() 列印 ride_sharing 的資訊,親自看看錯誤的資料型別如何影響你對資料集的分析。pandas 套件已匯入為 pd。
本練習屬於課程
用 Python 進行資料清理
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Print the information of ride_sharing
print(____.____())
# Print summary statistics of user_type column
print(ride_sharing['____'].____())