Hello,
I have a dataframe df
with 5 rows and a vector of vectors v=[[3],[5],[1,2],[4]]
.
I want to create a new dataframe dg
with rows indexes sorted in order of v
:
- the 1st row of
dg
is the 3rd row ofdf
- the 2nd row of
dg
is the 5th row ofdf
- the 3rd row of
dg
is the 1st row ofdf
- the 4th row of
dg
is the 2nd row ofdf
- the 5th row of
dg
is the 4th row ofdf
Thanks for your help.