我有一个数据文件,我想在其中按列求和。
数据看起来像:
Date;Heure;U12_min;U12_max;U12_moy
13/07/12-15:10:02;581072;41719;42058;41892
13/07/12-15:20:01;581088;41610;42108;41897
13/07/12-15:30:01;581105;41810;42048;41931
13/07/12-15:40:01;581122;41483;41988;41798
...
14/07/12-00:00:01;581955;42013;42377;42210
14/07/12-00:10:01;581972;41502;42117;41851
14/07/12-00:20:01;581988;41477;42349;42135
14/07/12-00:30:00;582005;42092;42517;42264
14/07/12-00:40:00;582022;41766;42653;42032
14/07/12-00:50:01;582038;41836;42267;42069
14/07/12-01:00:01;582055;42056;42334;42214
这是我的代码:
from pandas import *
fich = 'D://ENERGIE//test2.csv'
df = read_csv(fich, delimiter=";", index_col="Date")
df.sum["Heure"]
print df
我收到以下消息
df.sum["Heure"] TypeError: 'instancemethod' object is not subscriptable