DataFramesMeta.jl
DataFramesMeta.jl copied to clipboard
Request: `@order` to mimic `DataFrames.order` in `@orderby`
Currently, DataFramesMeta doesn't really support custom sorting options in an @orderby (although descending sort is supported through other Julia functions). It would be nice if you could mimic the following DataFrames syntax:
sort(df, order(:a, rev=true))
using something like
@orderby df @order(:a, rev=true)
Thanks!
Some of this is discussed in the dplyr tutorial here. I think the best solution is to use ordinalrank from StatsBase.jl
@orderby df ordinalrank(:x, rev = true)
I'm going to close this. I know the current behavior isn't perfect, but I think it's good enough to use without adding too many complications to the codebase.