我有這樣一個數據幀的累積總和鹼: customer spend hurdle
A 20 50
A 31 50
A 20 50
B 50 100
B 51 100
B 30 100
我要計算附加列的累積,這將在相同的客戶復位基地當累積總和大於或等於所述障礙像下面: customer spend hurdle Cumulative
A 20 5
我有具有以下結構的數據的大數據幀: name date val1 val2
1 A 2017-01-01 0 2
2 A 2017-01-02 1 1
3 A 2017-01-03 1 0
4 A 2017-01-04 0 3
5 A 2017-01-05 1 1
6 A 2017-01-06 0 0
7 B 2017-01-01 0 0
8 B 2017-01-