I have a df with the following structure:
I would like to accumulate in a new column called "Flight1_Accumulated" the sum of the past rows in Flight1. As an example, for index 2020-03-01, this new column will contain the sum of 2020-01-01, 2020-02-01 and 2020-03-01.
I think that probably pandas has an specific function to solve it without iterate rows. Probably dataframe.cumsum()
can do it.
The expected results (made with Excel) is:
Does anyone know how to solve it?