自學新手想請問一下大家用dataFrame轉成Series 在取平均要怎麼算
怎麼跑都不對Orz
====================================
import pandas as pd
data=pd.DataFrame({
"name":["Amy","Bob", "Charles"],
"salary":["30000","40000","50000"]
})
salaries=data["salary"]
print("薪水的平均值",salaries.mean())
============================================
這樣算出來是100001333350000.0
Orz
截圖 https://imgur.com/a/BRZPnzV