After grouping the column of the pandas dataframe how to do sum of another column of a dataframe based on the groups created.
df = df.groupby(by=['First'])
My dataframe:
First Second
A 5
6
10
B 4
5
expected dataframe:
First Second
A 21
B 9