demo 数据
one two three
a 1 5 9
b 2 6 10
c 3 7 11
d 4 8 12
、、、代码如下
df['row_sum']=df.apply(lambda x: x.sum(),axis=1)
print(df)
我的数据是这样的,
用上面的代码提示:
return umr_sum(a, axis, dtype, out, keepdims, initial, where)
TypeError: can only concatenate str (not "int") to str
求教,我的这种数据怎么求和呢。