# Dataframe (or generally pretty table) without header in Pluto

**URL:** https://discourse.julialang.org/t/dataframe-or-generally-pretty-table-without-header-in-pluto/59880
**Category:** General Usage
**Tags:** pluto, tables
**Created:** [April 23, 2021, 2:27pm UTC](https://discourse.julialang.org/t/dataframe-or-generally-pretty-table-without-header-in-pluto/59880 "2021-04-23T14:27:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)
#### Post date: [April 23, 2021, 2:27pm UTC](https://discourse.julialang.org/t/dataframe-or-generally-pretty-table-without-header-in-pluto/59880/1 "2021-04-23T14:27:40Z")

</div>

I am creating a certificate in Pluto, and I am currently displaying tables by putting them in a dataframe, which produces:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/3/6307182831a202fc7ba485bd4a98182a187244a2.png)

But the headers, which are not necessary, take up a lot of space. While a problem on its own, a further problem is spacing issues. Is there a way to not show the headers when displaying a DataFrame in pluto?

Alternatively, are there other ways of nicely display a table that takes less space? The purpose is to include the original data for reproducibility, and things have to look as professional as possible.

Another issue is potentially the row numbers - is it possible that 10 columns could be fitted if that column were not there? There are 50 datapoints, so if I want to fill the table I can at most have 5 columns, because the next higher factor in 50 is 10, which results in the need for horizontal scrolling. I have tried the following

 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/3/a343806ecb42e0102231ca8a468d07582280ae3e.png)  
based on  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/9/a95f6c8c2767fc92c0af4fce7149ed5f55f75091.png)  
from [this discussion](https://github.com/JuliaData/DataFrames.jl/issues/592). I guess I will have to supply the kwarg to `show` somehow, but i have had little luck in the past when experimenting with calling `show` directly.

---

<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: [April 23, 2021, 2:39pm UTC](https://discourse.julialang.org/t/dataframe-or-generally-pretty-table-without-header-in-pluto/59880/2 "2021-04-23T14:39:01Z")

</div>

You won’t be able to get around this without passing `show` directly. And you if you do that you might as well just call `pretty_table` directly and get even more options.

Pluto is leaving room for the header, but not showing the column types that are supposed to be in the header… that’s odd. Are they written, but in a white font so that it’s not showing up?

---

<div class="post-metadata">

### Author: ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)
#### Post date: [April 23, 2021, 2:55pm UTC](https://discourse.julialang.org/t/dataframe-or-generally-pretty-table-without-header-in-pluto/59880/3 "2021-04-23T14:55:05Z")

</div>

> [@pdeffebach](#):
>
> Pluto is leaving room for the header, but not showing the column types that are supposed to be in the header… that’s odd. Are they written, but in a white font so that it’s not showing up?

There is a very nice mouse-over animation that shows the types, so that they dont always show. Huge fan.  
“Passive”:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/3/a3aae363cad0320d7ab1010065c2ed86ba24be7d.png)  
Mousing over:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/8/98089cf0ab3bb465cf58cd7795b8f5fb693d99e5.png)

---

<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: [April 23, 2021, 2:58pm UTC](https://discourse.julialang.org/t/dataframe-or-generally-pretty-table-without-header-in-pluto/59880/4 "2021-04-23T14:58:04Z")

</div>

Huh, i’m not sure I’m a fan of that. For one, all your types as `Any` which can be a major problem! And you wouldn’t know unless you mouse-over.

---

<div class="post-metadata">

### Author: ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)
#### Post date: [April 23, 2021, 3:01pm UTC](https://discourse.julialang.org/t/dataframe-or-generally-pretty-table-without-header-in-pluto/59880/5 "2021-04-23T15:01:49Z")

</div>

> [@pdeffebach](#):
>
> You won’t be able to get around this without passing `show` directly. And you if you do that you might as well just call `pretty_table` directly and get even more options.

Pretty tables seemed to print to the terminal, as opposed to showing up in the notebook (see [this issue](https://github.com/ronisbr/PrettyTables.jl/issues/61)). Aaaaaand I see in the issue I linked to that I could display the pretty\_table with `HTML()`, and there are even some nice kwarg examples in the issue. I will look into this. But the original issue remains, that I would still prefer to have no header.

---

<div class="post-metadata">

### Author: ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)
#### Post date: [April 23, 2021, 3:03pm UTC](https://discourse.julialang.org/t/dataframe-or-generally-pretty-table-without-header-in-pluto/59880/6 "2021-04-23T15:03:56Z")

</div>

> [@pdeffebach](#):
>
> Huh, i’m not sure I’m a fan of that. For one, all your types as `Any` which can be a major problem! And you wouldn’t know unless you mouse-over.

I mean, changing the type is completely irrelevant for my application. I even have strings in the dataframe at a previous point, which is the reason for the type being `Any` - I am parsing them from an excel document that I am not writing, so I want to be able to handle any funky formatting thown at me from Excel. I simply need them to print pretty for a final displayed PDF.

---

<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: [April 23, 2021, 3:11pm UTC](https://discourse.julialang.org/t/dataframe-or-generally-pretty-table-without-header-in-pluto/59880/7 "2021-04-23T15:11:51Z")

</div>

I would say you are stuck with `HTML(pretty_table(...))`. It probably isn’t worth it to override `show` globally, especially since Pluto seems to have attached some kind of complicated behavior.

---

<div class="post-metadata">

### Author: ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)
#### Post date: [April 23, 2021, 5:42pm UTC](https://discourse.julialang.org/t/dataframe-or-generally-pretty-table-without-header-in-pluto/59880/8 "2021-04-23T17:42:13Z")

</div>

You could write your own html table with

> **[GitHub - JuliaPluto/HypertextLiteral.jl: Julia library for the string...](https://github.com/JuliaPluto/HypertextLiteral.jl)**
>
> Julia library for the string interpolation of HTML and SVG - GitHub - JuliaPluto/HypertextLiteral.jl: Julia library for the string interpolation of HTML and SVG

Usage in Pluto is shown here:

[![](https://global.discourse-cdn.com/julialang/original/3X/2/f/2f906d8b7295a35027ee6629a3c5fcdedd0c6765.jpeg "HypertextLiteral.jl - performant hypertext interpolation | Clark C. Evans | PlutoCon 2021") ](https://www.youtube.com/watch?v=5E21bdnAzYI)
