python/pandas: update a column based on a series of holding sums of that same column

后端 未结 0 336
挽巷
挽巷 2020-12-21 06:34

I have a dataframe with a non-unique col1 like the following

    col1    col2
0      a      1
1      a      1
2      a      2
3      b      3
4      b      3
         


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