g = history.groupby(by=['LinkTradeCode', 'InstrumentType', 'PutOrCall', 'KnockPrice', 'InstrumentGroup']).agg({'Volume': sum, 'CashCNY': sum})
# 取消分组后的索引
h = g.reset_index()
dataframe 分组后多列计算
猜你喜欢
转载自blog.csdn.net/panpan_v1/article/details/88824308
今日推荐
周排行