发布于 2019-07-06 20:34:52
我随机生成的数据,但我认为这应该是可行的。
df['team'] = [1 if p<=5 else 2 for p in df.player]
df.groupby(['matchid', 'team'])['visionscore', 'win'].sum()matchid team visionscore win
10 1 274 3
10 2 124 3
11 1 416 3
11 2 89 0https://stackoverflow.com/questions/56917288
复制相似问题