Neat way to return a single row with Query.jl pipes

I think you can use first here. first gives you the first element of an iterable collection.

ret = load("myfile.csv") |> 
@map({_.key, score=my_scoring_funk(_)}) |> 
@orderby_descending(_.score) |> 
@take(1) |> # I do not think this line is necessary if you want the first row
first
1 Like