I currently have a dataframe such as
[1, ], [2, ], [3, ]
[1, ] .5 9 3
[2, ] .10 2 2
[3, ] .15 8 1
I would like to find top n values in column 2 which are 9 and 8. Additional to that, I would like to get an output which prints correspondent value in column 1 which are 0.5 and 1.5.
I have tried which.max but that only returns only 1 top value. Any idea?