# Column names in dataframe

**URL:** <https://discourse.julialang.org/t/column-names-in-dataframe/78272>\
**Category:** New to Julia\
**Tags:** question, dataframes\
**Created:** [March 22, 2022, 12:32pm UTC](https://discourse.julialang.org/t/column-names-in-dataframe/78272 "2022-03-22T12:32:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![iAnkiit](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@iAnkiit](https://discourse.julialang.org/u/iAnkiit)\
**Post date:** [March 22, 2022, 12:32pm UTC](https://discourse.julialang.org/t/column-names-in-dataframe/78272/1 "2022-03-22T12:32:19Z")

</div>

Is there any function in Julia to print column names of dataframe ?  
I used names(dataframe) - It gave me the desired output but my dataframe contains 67 features, however the function printed few of them.  
How to get all the names ?

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [March 22, 2022, 12:37pm UTC](https://discourse.julialang.org/t/column-names-in-dataframe/78272/2 "2022-03-22T12:37:33Z")

</div>

It’s probably just the printing (show), which truncates the vector of names to your available terminal lines.  
You can check if

```julia
length(names(dataframe))

```

gives you `67`.  
Or you can print them all with

```julia
foreach n in names(dataframe)
println(n)
end

```

for example.

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [March 22, 2022, 1:01pm UTC](https://discourse.julialang.org/t/column-names-in-dataframe/78272/3 "2022-03-22T13:01:39Z")

</div>

`foreach(println, names(dataframe))`

---

<div class="post-metadata">

**Author:** ![lawless-m](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lawless-m/32/30869_2.png) [@lawless-m](https://discourse.julialang.org/u/lawless-m)\
**Post date:** [March 22, 2022, 1:16pm UTC](https://discourse.julialang.org/t/column-names-in-dataframe/78272/4 "2022-03-22T13:16:56Z")

</div>

As well as the other fine suggestions, you may also be interested in

[https://github.com/ronisbr/TerminalPager.jl](https://github.com/ronisbr/TerminalPager.jl)

---

<div class="post-metadata">

**Author:** ![danielw2904](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielw2904/32/10890_2.png) [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Post date:** [March 22, 2022, 1:30pm UTC](https://discourse.julialang.org/t/column-names-in-dataframe/78272/5 "2022-03-22T13:30:43Z")

</div>

For me

```julia
show(names(df))

```

works in the console.

Similarly to print such a DataFrame

```julia
show(df, allcols=true)

```
