Dynamic selection of columns Query.jl

Dear Community,

I am trying to dynamically select columns using Query.jl like in the following script, but I am unable to do so.
Any ideas?

Thank you

list_cols = [“col1”, “col2”…]

select = df |> @select(∈(list_cols)) |> DataFrame

Not an answer, but I give it for reference:

  • If df is already a data frame you can just use select(df, list_cols).
  • If df is not a data frame then do select!(DataFrame(df), list_cols). (! is used as we create a new data frame so it is safe to update it in place).

Thank you @bkamins, but I wanted to use the Query.jl framework, if possible