For example. Let us assume we are having below dataframe:
Num
0 2
1 4
2 1
3 5
4 3
The expected output in another "sum" should be as below:
Num sum
0 2 2
1 4 6 (2+4)
2 1 7 (2+4+1)
3 5 12 (2+4+1+5)
4 3 15 (2+4+1+5+3)