Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Compat with jupyter's new HTML table style #15379
Comments
jorisvandenbossche
added the
Output-Formatting
label
Feb 12, 2017
jorisvandenbossche
added this to the
0.20.0
milestone
Feb 12, 2017
|
The overriding can be done by adding the following style to each
Other options could be:
|
|
Another issue is that, IMO, we should keep some kind of wrapping long text in multiple lines, see eg the notebook here: http://nbviewer.jupyter.org/gist/epifanio/e82443b79c24ceb2d59ba49cad9a62d4 (from gitter). |
jorisvandenbossche
referenced
this issue
in jupyter/notebook
Feb 20, 2017
Closed
New table style makes it impossible to view data (5.0 beta) #2209
|
In the meantime, my proposal to remove the max-width in jupyter has been accepted, so we can close this issue! We can still adjust our |
jorisvandenbossche
closed this
Feb 27, 2017
jorisvandenbossche
modified the milestone: No action, 0.20.0
Feb 27, 2017
jorisvandenbossche
reopened this
Feb 28, 2017
|
Reopening this because there are some other issues we have to think about as well. What I encountered now are the display of MultiIndexes: Due to the right-alignment instead of left alignment, multi-indexed columns get a bit strange: Also multi-indexer rows are not ideal because the distinction between the levels is not always clear (the borders are gone, but the shading does not always differ depending on the number of rows in the level). In this case, that is OK: But in the following the shading is the same (and certainly when having more rows in one level label, or different number of rows for different labels, it becomes difficult to see the border between the level labels): |
|
Good catch. Would we be better of vertical-aligning the row MultiIndex? We'll also want to check the interaction with index-level names (I'm getting caught up on things, should have more time to look myself towards the end of the week). |
|
For the row multi-index, vertical alignment to the top seems better: The strange thing is that I see |
joshij1979
commented
Apr 13, 2017
|
I s there any option to disable the default styling .. basically i want to roll back to previous default settings.. |
|
You can try asking on their mailing list. There's probably a way with custom CSS, but nothing pandas would do.
…
|
jorisvandenbossche
referenced
this issue
in jupyter/notebook
Apr 13, 2017
Open
New table style and pandas MultiIndex issues #2408
|
For the MultiIndex issues (from the above comments), I opened an issue on the jupyter side: jupyter/notebook#2408 (and ideas what would be the best solution for the multi-indexed columns is also welcome ..) |
jorisvandenbossche
modified the milestone: 0.20.0, No action
Apr 16, 2017
|
@TomAugspurger any ideas what we could do for the multi-index columns? |
Looking now. I think we'll need to adjust the generated HTML to add some classes to the |
|
OK, putting together a PR now. Here's an example notebook comparing master and the PR https://gist.github.com/79f032afa4e498f86a9d59905d0f6fbd Changes:
|









jorisvandenbossche commentedFeb 12, 2017
See also discussion in jupyterlab/jupyterlab#961
With the upcoming notebook 5.0 release and in current jupyterlab, jupyter has a new (much better!) default HTML table styling. The only problem is that it fixes the width of columns hardcoded at 150 px.
IMO this is a problem. Not the default as such, but the fact that you cannot easily change this when you want to see long table content. The result is that when having cells/column names with long content (and sometimes you deliberately create such cells/column names), it is impossible to inspect those data with the default repr.
Only solutions are to inspect specifics such as
df.valuesordf.columns.Another consequence is that the
pd.options.display.max_colwidthoption becomes useless.Possible way forward:
max-widthfor our html repr's to set it to 'none' (@TomAugspurger shows here that this is possible: jupyterlab/jupyterlab#961 (comment))pd.options.display.max_colwidth(currently 50 chars) at the same time. The the default looks similar to jupyter's one, but you have still the ability to adjust it with our options.