sum groupby and add or sub row before to groupby and add row after to groupby
I have a dataframe and I would like to get summing values for every [group] with one row Values before (‘subtract’ & ‘add’) and one row after (‘BEGUZE_UE’) the group. (A group can contain different strings, UE_1 doesn’t matter).
But I get some wrong results in ‘m_days’. Thanks for any help.
Python: Only 2 unique column names in dataframe, 3105 columns total. How to get average of row, grouped by unique column name
My dataframe