I know that there would be more questions for cumulative division on stackoverflow. But my question is different from these questions.
Actually I want to do comulative division like we use comulative sum (cumsum) and comulative product(cumprod) in python. But there is no cumulative division function in python. If you have any alternative for this then tell me.
Problem:- Below is the dataframe (DF) in which I need to create Discount column and do cumulative division in (discount) column.
DF:-
Rates Discount
0.000028745455 1/(1+Rates)
0.000028745455 Discount[0]/(1+Rates)
0.000028745455 Discount[1]/(1+Rates)
0.000028745455 Discount[2]/(1+Rates)
0.000028745455 Discount[3]/(1+Rates)
0.000028745455 Discount[4]/(1+Rates)
0.000028745455 Discount[5]/(1+Rates)
Result:-
Rates Discount
0.000028745455 0.999971255
0.000028745455 0.999942512
0.000028745455 0.999913769
0.000028745455 0.999885026
0.000028745455 0.999856285
0.000028745455 0.999827545
0.000028745455 0.999798805