Cumsum as a new column in an existing Pandas data
Overview: you can use a dataframe aggregate and pass it an user defined function
def accumulate(values): """The accumulate function takes the offset previous numbers in a series and sums them. args: a dataframe with a 100 numbers """ offset=0 accumulate=[] for i in np.arange(len(values)): offset+=1 accumulate.append(values[:offset].sum()) return accumulate A=pd.DataFrame(np.arange(1,101), columns=['value']) A.aggregate(accumulate).plot()