From what I can tell a Deedle frame is only sorted by the index. Is there any way to apply a custom sorting function or sort by a given series (and define ascending/descending order)?
Can I sort a Deedle frame?
843 Views Asked by NeoDarque At
3
Sticking to a "standard" frame of type
Frame<int,string>(row index of integers and column names of strings) it is easy to implement a function capable of reordering the frame based on any single column contents in ascending or descending order:A smoke test over
peopleListsample frame:reorder false "Name" peopleListreturns the frame whereNameis sorted in descending orderwhile
reorder true "Age" peopleListreturns the frame whereAgeis sorted in ascending orderNevertheless, requirement of absent duplicate values in to-be-ordered column might be considered as a showstopper for this approach to Deedle frame ordering.