Description
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.