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?
856 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
peopleList
sample frame:reorder false "Name" peopleList
returns the frame whereName
is sorted in descending orderwhile
reorder true "Age" peopleList
returns the frame whereAge
is 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.