# Question about the function "getcolumn" from Tables.jl

**URL:** <https://discourse.julialang.org/t/question-about-the-function-getcolumn-from-tables-jl/40489>\
**Category:** General Usage\
**Created:** [May 30, 2020, 10:30pm UTC](https://discourse.julialang.org/t/question-about-the-function-getcolumn-from-tables-jl/40489 "2020-05-30T22:30:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kai](https://discourse.julialang.org/u/kai)\
**Post date:** [May 30, 2020, 10:30pm UTC](https://discourse.julialang.org/t/question-about-the-function-getcolumn-from-tables-jl/40489/1 "2020-05-30T22:30:49Z")

</div>

Hi, I’m trying to select a column from a table-like data set (it could be a database, a JuliaDB table and so on). In JuliaDB, this could be done using `JuliaDB.select(dat, :var)`. But I want my package to be able to take in any kind of tables, not just JuliaDB tables.

So I tried the `Tables.getcolumn(dat, :var)` function from `Tables.jl`. However, it’s giving me this error message: `ERROR: UndefVarError: getcolumn not defined`. What did I miss? Thanks.

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [May 31, 2020, 12:24am UTC](https://discourse.julialang.org/t/question-about-the-function-getcolumn-from-tables-jl/40489/2 "2020-05-31T00:24:36Z")

</div>

Can you make a MWE? It works for me.

---

<div class="post-metadata">

**Author:** ![kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kai](https://discourse.julialang.org/u/kai)\
**Post date:** [May 31, 2020, 12:38am UTC](https://discourse.julialang.org/t/question-about-the-function-getcolumn-from-tables-jl/40489/3 "2020-05-31T00:38:42Z")

</div>

Sure.

```julia
using DataFrames, CSV, Tables, JuliaDB
df = DataFrame(A = 1:4, B = 5:8)
CSV.write("data/minimal-test.csv", df)
dat = loadtable("data/minimal-test.csv")
Tables.getcolumn(dat, :B)

```

It would give  
`ERROR: type IndexedTable has no field B`.
