I am having a tough time with this one - not sure why...maybe it\'s the late hour.
I have a dataframe in pandas as follows:
1 10 2 11 3 20 4
Use cumprod.
Example:
df = pd.DataFrame({'A': [10, 11, 20, 5, 10]}, index=range(1, 6)) df['cprod'] = df['A'].cumprod()