I have a pandas data frame df like:
Name Hour Activity
A 4 TT
A 3 TT
A 5 UU
B 1 TT
C 1 TT
D 1 TT
D 2 TT
D 3 UU
D 4 UU
The next step is to get the summation if the rows have identical value of the column Name and Activity.
For example, for the case Name: A and Activity: TT will give the summation of 7
The result is the presented as below
TT UU
A 7 5
B 1 0
C 1 0
D 3 7
Is it possible to do something like this using pandas groupby?