1
import pandas as pd
output=pd.read_csv('output.csv',encoding='big5')
output['airplane'].sum()
我試圖總結數據框中的數字,但是當調用sum()
時,它只是打印出我希望總結的數字。爲什麼不把所有的數字相加?爲什麼我的數據幀沒有總和?
'5,0514,7834,3734,7925,4624,9404,8344,9045,1964,0213,9405,0515,1894,9805,0556,0595,7194,6255,4985,3305,3175,3785,6494,5514,3335,1605,3175,3175,3435,8994,6164,3145,2915,2445,2905,5055,7344,5074,1965,4815,6215,6135,6756,0035,1004,0065,5815,2963,1683,5623,8734,1104,2144,6275,3745,2025,8545,3684,5614,4245,3405,0525,0985,0945,6404,6874,3575,0355,0665,2985,1125,5954,9374,4015,2595,1505,2215,1755,9214,6694,3595,2935,2185,2695,3356,1814,9284,5755,1725,3925,8546,4215,5494,5423,7324,63
Bur我的號碼包含',',我無法將其轉換。 – ben
ok,什麼是'print(output ['airplane']。head())' – jezrael
0 5,051 1 4,783 2 4,373 3 4,792 4 5,462 名稱:airplane,dtype:object – ben