How to fit Pluto.jl output cell to DataFrame

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

1 Like

I’m not really sure what the right protocol is here, but I asked the same question on stackoverflow. 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?

1 Like

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

It appears like there are some arguments to the Base.show method defined in Functions · DataFrames.jl 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.

Even Though Fons says 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:

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

changes this:

to this:

Hope it helps someone.

1 Like

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