# How to get DTable column names?

**URL:** https://discourse.julialang.org/t/how-to-get-dtable-column-names/6307
**Category:** Data
**Tags:** data
**Created:** [October 7, 2017, 11:17am UTC](https://discourse.julialang.org/t/how-to-get-dtable-column-names/6307 "2017-10-07T11:17:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [October 7, 2017, 11:17am UTC](https://discourse.julialang.org/t/how-to-get-dtable-column-names/6307/1 "2017-10-07T11:17:38Z")

</div>

I loaded a set of CSV using JuliaDB.jl’s loadfiles.And I got a DTable, but there does not appear to be a function that can tell me the names of the columns.

There is a names functions for DataFrames it feels natural to have the same for IndexTables and DTable.

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [October 7, 2017, 12:26pm UTC](https://discourse.julialang.org/t/how-to-get-dtable-column-names/6307/2 "2017-10-07T12:26:19Z")

</div>

I think figured it out. The code can be improved though

```julia
import Base.names
function names(df::JuliaDB.DTable)
    tmpdf = JuliaDB.take_n(df,1)
    keys(tmpdf.data[1])
end

```
