sum each row group by column pandas code example
Example 1: pandas groupby sum
df.groupby(['Fruit','Name'])['Number'].sum()
Example 2: pandas python group by for one column and sum another column
df.groupby(['A','C'], as_index=False)['B'].sum()
df.groupby(['Fruit','Name'])['Number'].sum()
df.groupby(['A','C'], as_index=False)['B'].sum()