-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
  • 159,742
  • 34
  • 281
  • 339
Viraj Mehta
  • 81
  • 3
  • 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