I have a dataframe which contains duplicates values according to two columns (A and B):
A B C
1 2 1
1 2 4
2 7 1
3 4 2
3 4 8
I want to remove the duplicates by keeping the columns A and B and C should be the sum of the duplicate entries
A B C
1 2 5
2 7 1
3 4 10
I cannot figure out how to implement this in my code!! Please help