使用 .groupby() 與 .agg() 做摘要
在這個練習中,你會探索逐年失業率資料的平均數與標準差。首先,你會不分洲別地計算平均數與標準差,以觀察全球失業趨勢。接著,你會依洲別拆分來檢視失業趨勢。
unemployment DataFrame 已可使用,且已將 pandas 以 pd 匯入。
本練習屬於課程
Python 的探索性資料分析
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Print the mean and standard deviation of rates for 2019 and 2020
print(unemployment[["2019", "2020"]].____)