Is there a way to get original column back from column which is a cumsum() of the original column?
For example:
df = pd.DataFrame({'Original': [1, 0, 0, 1, 0, 5, 0, np.NaN, np.NaN,4, 0, 0],
'CumSum': [1, 1, 1, 2, 2, 7, 7, np.NaN, np.NaN, 11, 11, 11]})
In the above example df, Is it possible to get original column just using the CumSum column?
In my original dataset, I have a column similar to CumSum column and I want to get the original. I tried to find an inbuilt function that can do but haven't found any.