I've got a dataframe which in general form looks like this.
A B C
0 1 2 3
1 2 4 6
2 3 5 7
I'd like to create another dataframe where in each value is the cumulative sum along the row of values in the original dataframe, starting from the right, rather than the left - i.e. the output should look like this:
A B C
0 6 5 3
1 12 10 6
2 ...
Can anyone suggest a bit of code to do this?