Ways to order a `DataFrame` by mixed order?

I wanted to order a DataFrame by certain mixed order, e.g. i want to order a DataFrame by a_str in
descending order followed by b_str in ascending order

Setting up data

using DataFrames, Query

a_str = string.(rand(UInt16, 100))
b_str = string.(rand(UInt16,100))

df = DataFrame(a_str = a_str, b_str = b_str)


@> begin
  sort!([order(:a_str, rev = true), :b_str])

**DataFramesMeta.jl **

Not possible. See: the DataFramesMeta.jl had an outstanding issue from 2017

Query.jl way

#const Q = Query
@> begin
  @orderby_descending _.a_str
  @thenby _.b_str

Query.jl has an implementation. But I think Query.jl used to have some significant performance issues.

A more natural way to write the Query.jl version would be:

df |>
  @orderby_descending(_.a_str) |>
  @thenby(_.b_str) |> 

You can just use the normal julia pipe operator.

I like not having to type |>. In Rstudio %>% is mapped to Ctrl-Shift-m which is more convenient.