How can I merge column data of the same value and sum its specific data (in this case based of the DATE column)
For Example: df
includes:
78 79 80 DATE
8.99 7.99 6.99 201107
3.5 2.5 1.5 201107
5.48 4.48 3.48 201108
4.04 3.04 2.04 201108
5.03 4.03 3.03 201108
What I would like is:
78 79 80 DATE
12.49 10.49 8.49 201107
14.55 11.55 8.55 201108
What is the simplest way of achieving this?
You can
groupby
on 'DATE' column and then callsum
: