Skip to content

New table style makes it impossible to view data (5.0 beta) #2209

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

I know this has been raised and discussed before (jupyterlab/jupyterlab#961, jupyterlab/jupyterlab#910 (comment), and actually the max-width has been increased due to that discussion), but, with the risk of trolling, I would like to raise this again (and opening an issue here instead of at jupyterlab, as with the 5.0 beta it seems more urgent here).
To be clear: I really like the new table style! My only concern is regarding the hard-coded max-width and hiding of data.

Problem: due to the hard-coded max-width: 150px combined with white-space: nowrap, actual data gets hidden without any alternative way to look at the actual data.
For me, the notebook is for a large part about "interacting with my data". An essential aspect of this, just looking at what is in my dataframe, is now impossible once you have a bit longer cell contents.

And you very easily get to this limit of 150px, eg timestamps with subsecond digits (common in certain fields), a bit longer species names, review comments, ...

Possible solution: My preferred solution would be to rework this part of the table styling to always display all provided data (and there are some different options to obtain this, like no max-width, or a max-width but with text wrapping over multiple lines, ...)
Other way of putting it is this principle: let the library that generates the table control what data is visible, and let jupyter just display it 'unopinionated'.

As I said, the above is my preferred solution because this would let pandas (and other libraries generating tables) be able to control what is actually displayed (as we already currently do with pd.options.display.max_colwidth).
But of course, there can also be other solutions like:

  • make this easily configurable from jupyter
  • display full data on hover
  • ..

To be clear: it doesn't has to be my provided solution, but at least I hope you are open to reconsidering this aspect of the table styling (irregardless of the outcome of the discussion in the end :-)).


Note: we can override this from the pandas side, by including a style tag with every generated table. Relevant issue is here: pandas-dev/pandas#15379 (and we would consider a bug-fix 0.19.3 release if necessary).
I will put some illustration of the interaction of pandas with the new table style in a next comment.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions