計算變數的統計量
我們已為你建立一個 pandas 的 DataFrame,名稱為 data,其中包含 3 個變數:var1、var2 與 var3。
接下來你要計算這些變數的平均值與標準差,並印出整個資料集的關鍵統計量。
你可以使用主控台來探索資料集。
本練習屬於課程
Python 的客群分群
練習說明
- 印出資料集中各變數的平均值。
- 印出資料集中各變數的標準差。
- 說明(列出)資料集的關鍵統計量。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Print the average values of the variables in the dataset
print(____.____())
# Print the standard deviation of the variables in the dataset
print(____.____())
# Get the key statistics of the dataset
print(____.____())