DataFrames show() ignores column width, prints everything

Hi, I’m using DataFrames with IJulia and when I create a DataFrame and then “show” it, instead of truncation like in Python it shows all columns non-truncated, which obviously hangs always. I’ve tried setting ENV[“COLUMNS”] but DataFrames is ignoring it.

I can always reproduce with


(Here I see the variable ENV shown truncated to 10 characters).

But subsequently

using DataFrames
x = repeat("ABC", 20000)
df = DataFrame(i=1:50, j=repeat(x, 50));


hangs for a second, then shows full 20k characters long lines.

What is the cause and fix? I am using classic Jupyter.



in this case for the time being.

We are waiting to integrate PrettyTables.jl support for HTML and LaTeX backend to fix it consistently, and I know @Ronis_BR is working on it.

Thanks, that stops the hanging output but unfortunately it truncates all columns and prints only the first one.
For the example above, when I use show(df), it shows the first column and

50×2 DataFrame. Omitted printing of 1 columns
│ Row │ i     │
│     │ Int64 │
│ 1   │ 1     │

Is there a built-in function to print e.g. 10 chars from each column side by side for the first like 5 rows?

Please update DataFrames.jl to 0.22 version and then report if what is printed is OK. You are using an old version of DataFrames.jl, which had different printing method.