# How to hide the types line when pretty printing a data frame

**URL:** <https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393>\
**Category:** General Usage\
**Tags:** question, dataframes, prettytables\
**Created:** [January 15, 2020, 12:42pm UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393 "2020-01-15T12:42:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [January 15, 2020, 12:42pm UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393/1 "2020-01-15T12:42:13Z")

</div>

I’m sure this was mentioned before, I just can’t find it in `PrettyTables.jl`’s documentation nor here on Discourse. How can I hide the row indicating the columns’ types when printing a `DataFrame`?

```julia
julia> using DataFrames, PrettyTables

julia> n = 5
5

julia> df = DataFrame(x = rand(n), y = rand(Int, n))
5×2 DataFrame
│ Row │ x │ y │
│ │ Float64 │ Int64 │
├─────┼──────────┼──────────────────────┤
│ 1 │ 0.719891 │ -5232346815017973625 │
│ 2 │ 0.205348 │ 2842626681257293791 │
│ 3 │ 0.060852 │ -2140500196739737047 │
│ 4 │ 0.897562 │ -1243809382461516784 │
│ 5 │ 0.502659 │ -8876359708955921854 │

julia> pretty_table(df)
┌──────────────────────┬────────────────────────┐
│ x │ y │
│ Float64 │ Int64 │ # ← hide this row
├──────────────────────┼────────────────────────┤
│ 0.7198907881907508 │ -5.232346815017974e18 │
│ 0.20534849384840537 │ 2.842626681257294e18 │
│ 0.060852015344203814 │ -2.140500196739737e18 │
│ 0.8975619167730042 │ -1.2438093824615168e18 │
│ 0.5026589809343593 │ -8.876359708955921e18 │
└──────────────────────┴────────────────────────┘

```

---

<div class="post-metadata">

**Author:** ![dunefox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dunefox/32/12149_2.png) [@dunefox](https://discourse.julialang.org/u/dunefox)\
**Post date:** [January 15, 2020, 2:11pm UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393/2 "2020-01-15T14:11:36Z")

</div>

Is this what you want? If so, it’s in the documentation under Keywords:

```julia
julia> pretty_table(df, nosubheader=true)
┌─────────────────────┬───────────────────────┐
│ x │ y │
├─────────────────────┼───────────────────────┤
│ 0.5368664265830216 │ -7.331895038144373e18 │
│ 0.7266492236216804 │ 2.529146168444223e18 │
│ 0.2339360650833009 │ -9.159461584161755e18 │
│ 0.4645563509191173 │ 6.820674934457448e18 │
│ 0.25767054251840427 │ -7.139914099109241e18 │
└─────────────────────┴───────────────────────┘

```

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [January 15, 2020, 2:16pm UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393/3 "2020-01-15T14:16:34Z")

</div>

Thanks. I didn’t even try

```julia
help?> pretty_table

```

just looked at the hosted documents. But of course, it’s [there](https://pkg.julialang.org/docs/PrettyTables/kRdcL/0.8.0/man/text_backend/#Text-back-end-1) too… Thanks!

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [August 16, 2022, 6:26am UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393/5 "2022-08-16T06:26:43Z")

</div>

All kwargs are also accepted by `show`:

```julia
julia> show(DataFrame(rand(2,3), :auto), nosubheader=true)
2×3 DataFrame
 Row │ x1 x2 x3
─────┼──────────────────────────────
   1 │ 0.812423 0.815418 0.161294
   2 │ 0.834394 0.977342 0.327513

```

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [August 16, 2022, 7:56pm UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393/6 "2022-08-16T19:56:37Z")

</div>

`nosubheader` was apparently deprecated [Keyword arguments: change `noheader=true` -\> `header=false` ? · Issue #160 · ronisbr/PrettyTables.jl · GitHub](https://github.com/ronisbr/PrettyTables.jl/issues/160) and replaced with `show_subheader` but I can’t find that replacement in the `dev` docs [Search · Pretty Tables](https://ronisbr.github.io/PrettyTables.jl/dev/search/?q=show_subheader).

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [August 16, 2022, 8:10pm UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393/7 "2022-08-16T20:10:08Z")

</div>

I have just copy-pasted the above.

Probably @Ronis_BR can guide us to a definite reference of currently supported kwargs.

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [August 16, 2022, 8:17pm UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393/8 "2022-08-16T20:17:22Z")

</div>

BTW, why does `show` take the `pretty_table` kwargs?

---

<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:** [August 16, 2022, 8:28pm UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393/9 "2022-08-16T20:28:16Z")

</div>

`show` uses `pretty_table` under the hood, so it makes sense to forward the keyword arguments.

---

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [August 16, 2022, 9:35pm UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393/10 "2022-08-16T21:35:17Z")

</div>

Hi @jar1 !

You can find the documentation about `show_subheader` here:

[https://ronisbr.github.io/PrettyTables.jl/dev/man/usage/](https://ronisbr.github.io/PrettyTables.jl/dev/man/usage/)

Btw, I just realized that the docs ate wrong 🙂 I will fix it.

---

<div class="post-metadata">

**Author:** ![jonalm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonalm/32/16038_2.png) [@jonalm](https://discourse.julialang.org/u/jonalm)\
**Post date:** [October 3, 2025, 11:25am UTC](https://discourse.julialang.org/t/how-to-hide-the-types-line-when-pretty-printing-a-data-frame/33393/11 "2025-10-03T11:25:31Z")

</div>

The name of the kwarg changed in the last release of PrettyTables (3.0.0); the new kwarg is `show_first_column_label_only = true`
