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:
Are you sure these indices in the vector couldn’t be replaced by the usual split-apply-combine workflow with dataframes? Maybe these indices are being computed from other columns of the original dataframe?