開始使用免費開始

重新排序 Series 中的類別

在地狗狗領養機構的負責人請你檢視她的可領養狗狗資料。她特別關心資料集中狗狗的體型,並想知道在不同體型下,其他變數是否有差異。可領養狗狗的資料集已載入為 dogs,而 "size" 變數已經儲存為分類(categorical)欄位。

本練習屬於課程

在 Python 中處理類別資料

檢視課程

動手互動練習

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

# Print out the current categories of the size variable
print(____)
編輯並執行程式碼