How to create cumulative sum (new_supply)in dataframe python from demand column from table
item Date supply demand
A 2018-01-01 0 10
A 2018-01-02 0 15
A 2018-01-03 100 30
A 2018-01-04 0 10
A 2018-01-05 0 40
A 2018-01-06 50 50
A 2018-01-07 0 10
B 2018-01-01 0 20
B 2018-01-02 0 30
B 2018-01-03 20 60
B 2018-01-04 0 20
B 2018-01-05 100 10
B 2018-01-06 0 20
B 2018-01-07 0 30
New Desired table from the above table
item Date supply demand new_supply
A 2018-01-01 0 10 0
A 2018-01-02 0 15 0
A 2018-01-03 100 30 55
A 2018-01-04 0 10 0
A 2018-01-05 0 40 0
A 2018-01-06 50 50 100
A 2018-01-07 0 10 0
B 2018-01-01 0 20 0
B 2018-01-02 0 30 0
B 2018-01-03 20 60 110
B 2018-01-04 0 20 0
B 2018-01-05 100 10 140
B 2018-01-06 0 20 0
B 2018-01-07 0 30 0