0

I have a simple question.

I have a dataframe that has values that look like these:

Unit     Load     Value
1        3        4
2        3        3.2
3        2        4.1
1        5        3.4
2        4        3.8
3        4        6.1
.
.

I want to find the maximum values of all Units for the column Value.

Ie: in this example Unit 1 has a max of 4 and Unit 2 has a max of 3.8....etc....

What's the easiest way of doing this? (Load values don't matter)

HelloToEarth
  • 2,027
  • 3
  • 22
  • 48

1 Answers1

1
df.groupby('Unit').Value.max()
Felix
  • 1,837
  • 9
  • 26