0

I have a current df:

Name, Yearly Size, Monthly Size
colin, 100, 110
mary, 1000, 1010
colin, 200, 500
mary, 1000, 5010

I need: sum() the Yearly Size max() the Monthly Size

Output I need is:

Name, Yearly Size, Monthly Size
colin, 300, 500
mary, 2000, 5010

I know how to use one function with groupby

df.groupby(['name'])['Yearly Size'].sum()

I'm stuck with calling another function so the 3rd column is returning data via new function max()

Harry123
  • 47
  • 5

0 Answers0