計算類別型數值的次數
回想上一個練習,unemployment DataFrame 含有 182 列的國家資料,包括 country_code、country_name、continent,以及 2010 到 2021 年的失業率百分比。
現在你想探索 unemployment 中的類別型資料,了解各洲相關的內容。
已為你載入 unemployment DataFrame,並將 pandas 載入為 pd。
本練習屬於課程
Python 的探索性資料分析
練習說明
- 使用一個方法來計算
unemploymentDataFrame 中每個continent的值出現次數。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Count the values associated with each continent in unemployment
print(____)