How do i calculate a rolling mean or moving average where i consider all the items that I have seen so far.
Lets say I have a data-frame like below
col new_col
0 1 1
1 2 1.5
2 3 2
and so on. Now i would like to add a new column where i caclulate the average of all the items in col until that point. Specifying a window will mean that i will get the first few as Nan and then it only does a rolling window. But i need something like above.