I have a dataframe:
a b val1_b1 val1_b2 val2_b1 val2_v2
1 2 5 9 4 6
I want to take the max by column group, so the dataframe will be:
a b val1 val2
1 2 9 6
or the RMS:
a b val1 val2
1 2 sqrt(106) sqrt(52)
What is the best way to do so?