-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New table style and pandas MultiIndex issues #2408
Comments
Ping @ellisonbg |
I am fine trying this out. I think the main take home I have from this redesign is that it is going to be really difficult to satisfy every usage case with a single table style. This design, while being used by Pandas, it designed to be completely generic and general. This particular change may be fine to use in general, but I think if Pandas wants to do custom things, they should push HTML with inline styles that modify needed things. This is especially true with all the complexities of nested indices. |
Just a little anecdote from our deployment of Notebook v5 at Netflix -- there have been people that love the new table style, especially when they have many columns from a query. I was surprised because I found it too small to read. |
FYI, we're handling this on the pandas side at pandas-dev/pandas#16080 if anyone has any feedback. |
Follow-up issue on #2209, but I thought better to open a new issue.
There are still some aspects where the new table style does not play very nice with pandas generated tables, more specifically with MultiIndexes
See also the comments in the pandas issue pandas-dev/pandas#15379 (comment), but the main point is that the default alignment of the headers in the new table style makes the interpretation of a table with MultiIndexes (or in general multiple header rows) somewhat confusing:
multi-row column headers: due to the right-alignment instead of left alignment, multi-indexed columns get a bit strange:
I don't directly know a way to solve this in a html/css way while keeping the right alignment. In the above case, I think we would ideally want 'A' to be above 'a' ? (which is not the same as left aligning it)
Anybody an idea about this?
multiple row headers: 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):
This could be rather easily solved with 'vertical-align: top', which looks better in this case:
But the question of course is whether this will look better in general cases as well. And whether this is something that could be changed in the default jupyter styles? Other option is that pandas includes this in the html output, which would also not be that difficult.
The text was updated successfully, but these errors were encountered: