Select and rename columns in IndexedTables.jl / JuliaDB.jl

#1

With dplyr experience, I am just learning and testing IndexedTables.jl / JuliaDB.jl. The following seems verbose. (using https://github.com/oxinabox/Pipe.jl)

julia> a = table([1,1,1,2,2,2], [1,1,2,2,1,1], [1,4,2,5,6,7], names=[:x,:y,:z]);

julia> b = @pipe select(a, (:x, :y)) |> renamecol(:x=>:newx, :y=>:newy)

It is just b = select(a, newx = x, newy = y) in dplyr or b = a.selectExpr("x as newx", "y as newy") in sparkSQL.

0 Likes