I have a dataframe as follows:
df = pd.DataFrame({'cost_saving': [10, 10, 20, 40, 60, 60],'id': ['a', 'b', 'c', 'd', 'e', 'f']})
How can I draw a cumulative chart of the savings?
I'm thinking of a line chart with number of items on the x-axis, and total savings on the y-axis.
The chart should show that the bulk of the savings come from a few items.
I've tried:
dftest['cost_saving'].plot(drawstyle='steps')
but it doesn't plot the cumulative values.
Thanks for any help!