Skip to content

Dataframes with wide columns have poor plain/text representations #1272

@cstjean

Description

@cstjean

On a regular 80-column-wide terminal, printing a dataframe with a wide column yields this:

julia> DataFrame(name=["Tom", "Eric", "Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Zeus"], age=[10, 20, 30])
3×2 DataFrames.DataFrame
│ Row │ ├─────┼
│ 1   │ │ 2   │ │ 3   │ 

│ Row │ name                                                                                                                                                                              │
├─────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 1"Tom"                                                                                                                                                                             │
│ 2"Eric"                                                                                                                                                                            │
│ 3"Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Zeus" │

│ Row │ age │
├─────┼─────┤
│ 110  │
│ 220  │
│ 330

For comparison, pandas:

                                                name  age
0                                                Tom   10
1                                               Eric   20
2  Adolph Blaine Charles David Earl Frederick Ger...   30

Issues:

  1. The first table looks irrelevant?
  2. The second table doesn't respect the 80 characters limit.
  3. I've seen some of the discussion behind splitting big dataframes into several tables, but perhaps the current show behavior would be more appropriate for showall?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions