group by a dataframe column and get sum of other specific column stack overflow code example
Example: pandas python group by for one column and sum another column
df.groupby(['A','C'], as_index=False)['B'].sum()
df.groupby(['A','C'], as_index=False)['B'].sum()