Group By and find reference value in other column

I want to do a GroupBy over several rows and find a maximum value. This is fine. However corresponding to the maximum row, let us say Row65 I want to get the readout of a value in another column in Row65. How can I set this reference between the maximum in a column in a certain row and the corresponding value in another column in the same row? Or is GroupBy not appropriate ?


Thank you

I haven't found a solution or a workaround to GroupBy for my intentions so far. Any ideas?

If you're always looking for the max or min you can do a sort first and use "first" or "last" as your aggregation method.

There are several columns to be calculated in MAX and MIN, simultaneously. Therefore, sorting is difficult.


you could join the grouped table afterwards with the original table using the group values and min/max value of the column to get the value from the other column.



That sounds feasible. Thank you.