How to I do a sum with multiple conditions with groupby in python?

前端 未结 0 1697
长发绾君心
长发绾君心 2020-12-16 20:59

filter group by

df.groupby(\'Season\')[\'Cost\'].sum()[\'Winter\']

I am able to do with singular condition where Season = Winter. How do I do it with multipl

相关标签:
回答
  • 消灭零回复
提交回复
热议问题