0

I have the following dataframe:

     Location    Month    Unit

0    Loc1        1        5

1    Loc1        1        5 

2    Loc1        2        6

3    Loc2        2        6 

4    Loc2        3        7

5    Loc2        3        7 

I figured I could use groupby to get the following output:

     Location    Month    Unit

0    Loc1        1        10

1    Loc1        2        6

2    Loc2        2        6

3    Loc2        3        14 

However, I have not figured out how to do this. Any suggestions?

grimrol123
  • 21
  • 5

0 Answers0