这是我的数据
df
No Name Address English History Math Physics Chemistry Biology
1 Arthur New York 80 65 100 89 92 94
2 Barthur New Mexico 70 60 94 83 82 95
我所做的是
df['Science'] = df['Math'] + df['Physics'] + df['Chemistry'] + df['Biology']
我的问题是,实际数据超过900列,如何将df['Math'] + df['Physics'] + df['Chemistry'] + df['Biology']
替换为df['Math']
到{
我希望这个问题足够清楚
我想您需要^{} 按职位选择:
或者删除不需要的数字列:
^{pr2}$编辑:
如果只需要从
5
到结尾的所有列:相关问题 更多 >
编程相关推荐