標準差
你現在應該已經熟悉這個環境資料集。不過,到目前為止你使用的是清理過的版本。 原始資料集包含多個離群值,會影響分析結果。
接下來你將用剛學到的方法,把這些離群值視覺化。
本練習屬於課程
使用 Python 分析 IoT 資料
練習說明
- 計算
"temperature"欄位的平均值,並指派到data中的一個欄位。 - 計算上限與下限,並各自指派到
data中不同的欄位。 - 繪製
data。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Calculate mean
data["mean"] = ____
# Calculate upper and lower limits
data["upper_limit"] = data[____] + (____ * ____)
data["lower_limit"] = ____
# Plot the DataFrame
____
plt.show()