Group by and apply custom function in pandas data frame

前端 未结 0 1720
温柔的废话
温柔的废话 2021-01-26 22:39

I have a df as below:

I would like to group by id and flag and create a new column in the df which is the result of: [sum(value1)/sum(value2)] * 12. Therefore I w

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