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

**URL:** https://discourse.julialang.org/t/select-and-rename-columns-in-indexedtables-jl-juliadb-jl/23077
**Category:** Data
**Created:** [April 12, 2019, 1:22pm UTC](https://discourse.julialang.org/t/select-and-rename-columns-in-indexedtables-jl-juliadb-jl/23077 "2019-04-12T13:22:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![qsong](https://avatars.discourse-cdn.com/v4/letter/q/d07c76/32.png) [@qsong](https://discourse.julialang.org/u/qsong)
#### Post date: [April 12, 2019, 1:22pm UTC](https://discourse.julialang.org/t/select-and-rename-columns-in-indexedtables-jl-juliadb-jl/23077/1 "2019-04-12T13:22:24Z")

</div>

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

```julia
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.
