# How to fit Pluto.jl output cell to DataFrame

**URL:** https://discourse.julialang.org/t/how-to-fit-pluto-jl-output-cell-to-dataframe/57125
**Category:** Pluto
**Created:** [March 14, 2021, 11:51am UTC](https://discourse.julialang.org/t/how-to-fit-pluto-jl-output-cell-to-dataframe/57125 "2021-03-14T11:51:58Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jonasjonker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonasjonker/32/22535_2.png) [@jonasjonker](https://discourse.julialang.org/u/jonasjonker)
#### Post date: [March 14, 2021, 11:51am UTC](https://discourse.julialang.org/t/how-to-fit-pluto-jl-output-cell-to-dataframe/57125/1 "2021-03-14T11:51:58Z")

</div>

When I display a DataFrame in Pluto.jl a scrollbar appears. Does somebody know how to make my output cell bigger/fit my dataframe?

 ![2021-03-14-124518_728x372_scrot](https://global.discourse-cdn.com/julialang/original/3X/0/f/0f4be74d4291c466dc80ca266ee0558d9a701e87.png)

---

<div class="post-metadata">

### Author: ![jonasjonker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonasjonker/32/22535_2.png) [@jonasjonker](https://discourse.julialang.org/u/jonasjonker)
#### Post date: [March 14, 2021, 12:00pm UTC](https://discourse.julialang.org/t/how-to-fit-pluto-jl-output-cell-to-dataframe/57125/2 "2021-03-14T12:00:13Z")

</div>

I’m not really sure what the right protocol is here, but I asked the same question on [stackoverflow](https://stackoverflow.com/questions/66624243/how-to-fit-pluto-jl-output-cell-to-dataframe-size). I thought it was good that the questions are linked in some way. Or is this something I shouldn’t do/do differently next time?

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [March 15, 2021, 9:09am UTC](https://discourse.julialang.org/t/how-to-fit-pluto-jl-output-cell-to-dataframe/57125/3 "2021-03-15T09:09:10Z")

</div>

Cross posting is fine IMO as long as you link them.

---

<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 2, 2021, 1:25pm UTC](https://discourse.julialang.org/t/how-to-fit-pluto-jl-output-cell-to-dataframe/57125/4 "2021-04-02T13:25:12Z")

</div>

It appears like there are some arguments to the Base.show method defined in [Functions · DataFrames.jl](https://dataframes.juliadata.org/stable/lib/functions/#Base.show) that would allow toggling of this setting, though my attempt at calling the method with my own arguments did not go well. Possibly because I am unable to find out what the IO-channel for Pluto is - calling calling `show` and giving `stdout` as the first argument only prints to the terminal.

---

<div class="post-metadata">

### Author: ![jonasjonker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonasjonker/32/22535_2.png) [@jonasjonker](https://discourse.julialang.org/u/jonasjonker)
#### Post date: [June 22, 2021, 12:41pm UTC](https://discourse.julialang.org/t/how-to-fit-pluto-jl-output-cell-to-dataframe/57125/5 "2021-06-22T12:41:03Z")

</div>

Even Though Fons [says](https://github.com/fonsp/Pluto.jl/issues/996) the scrollbar is a feature, it still annoys me. It is however fixable with a little css. I thought I share it here. Adding a cell in pluto with the following code:

```julia
html"""<style>
pluto-output.scroll_y {
    max-height: 450px; /* changed this from 400 to 450 */
}
"""

```

changes this:

 ![2021-06-22-142809_1600x900_scrot](https://global.discourse-cdn.com/julialang/original/3X/4/d/4d81fa0ec84a8cc27a5233c4fc8c3cc4a45f446b.png)

to this:

 ![2021-06-22-142821_1600x900_scrot](https://global.discourse-cdn.com/julialang/original/3X/e/1/e110a919d0c6663502aabdacbe7cdb92e0ba9a36.png)

Hope it helps someone.

---

<div class="post-metadata">

### Author: ![jonasjonker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonasjonker/32/22535_2.png) [@jonasjonker](https://discourse.julialang.org/u/jonasjonker)
#### Post date: [June 22, 2021, 1:18pm UTC](https://discourse.julialang.org/t/how-to-fit-pluto-jl-output-cell-to-dataframe/57125/6 "2021-06-22T13:18:27Z")

</div>

502px seems to be enough to show 15 rows without scrollbar. After 15, rows are hidden by default.

 ![2021-06-22-151550_1600x900_scrot](https://global.discourse-cdn.com/julialang/original/3X/4/5/453f7923bbda0741a9becf089fff4293d6c65858.png)
