I have a data frame like
Id A B C D E F
a 1 2 9 4 7 6
b 4 5 1 3 6 10
c 1 6 0 3 4 5
I want a data frame like
Id
a C E F D B A #for a, C has the highest value, then E then F and so on...similarly for other rows
b F E B A D C
c B F E D A C
Basically, i am sorting each row of the data frame first and then replacing row values by the respective column names.
Is there any nice way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…