-2

This is the dataset I am working on right now. Dataset

I want to find the maximum value of the cycle column for a single value of the id column. For ex, I want to find out the max cycle value for id-1, id-2 and so on but I can't really figure out the loop logic. How do I get the code to ouptut maximum cycle value for particular id? My dataset has id values from 1-100 so the code should give me a 100 max cycle values.

jpp
  • 147,904
  • 31
  • 244
  • 302
Viraj Mehta
  • 61
  • 2
  • 9

1 Answers1

-1

it's not a loop. you can use a pivot table to find your answer:

https://pandas.pydata.org/pandas-docs/stable/reshaping.html