I have the following dataframe df:
ID 03/01/2021 17/01/2021 20/02/2021 03/07/2022 17/07/2022
0 ABC 5 6 10 5 5
1 BCD 6 7 3 6 10
2 DEF 10 4 5 2 8
I would like to look up for the columns that have the same month and year ,and save the sum of the values in a new dataframe.
Output would be:
date sum
01/2021 38
02/2021 18
07/2022 36
02/2023 19
I do appreciate your help!