I have a dataframe that i sorted in order to get the maximum (of values in a column).
Now, i want to get the index corresponding to this maximum in the initial dataframe.
Iβve tried a lot of things with rownumber or other but nothing works.
Thanks in advance for your help.
Just in case, the findmax() and sortperm() functions are quite useful too:
df = DataFrame(x = rand(10), y = rand(10))
findmax(df.x) # outputs the maximum x-value and its row number
ix = sortperm(df.x, rev=true)
ix[1] # row number with maximum x value
df.x[ix[1]] # maximum value in column x