-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
BUG: GH14882 Incorrect index label displayed on MultiIndex DataFrame #14975
Conversation
Current coverage is 84.67% (diff: 100%)@@ master #14975 diff @@
==========================================
Files 144 144
Lines 51047 51057 +10
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 43216 43230 +14
+ Misses 7831 7827 -4
Partials 0 0
|
hmm, this seems to duplicate lots of code. I think a better soln is to borrow what @TomAugspurger |
@jreback Not sure I agree that it works as expected in |
@Dr-Irv that's the point, you may need to adjust |
@jreback The current PR fixes the truncation issue for |
@Dr-Irv yes, my point is that rather than fixing 'to_html', I would rather try to write new code in .style and just fix the issue that way. otherwise this will just go on, creating more and more code. IIRC @TomAugspurger didn't think this was very difficult |
@jreback I guess we should hear what @TomAugspurger has to say? You're suggesting that the implementation in How about this idea. You merge in this PR, and I'll create a new issue for |
Didn't look at the code, but regarding the "implement in I don't know if we are ready for such a switch (@TomAugspurger ? do you have an idea on what would be the hurdles? missing features?), but I would see this as a separate issue. |
Yes, separate issues. I don't think there are any blockers for rewriting to_html with the style stuff, other than formally adding jinja2 as a dependency. |
The issue I have with this is we are adding lots of code (with if-thens), which is simply going to be ripped out when this is converted to So, is it easier to convert to |
Not only those added lines, but the full html formatting code will be ripped out, which is a lot longer as the added lines.
The thing is, converting the repr to be based on
@TomAugspurger Does Is |
Agreed, which means I'm +1 for merging this PR, even if it's obsolete in the near future. In any event, the tests from this PR would be great to have.
I'm not going to have time to work on it before 0.20.
No, not yet. It wouldn't be terribly difficult code-wise. I just don't know if it's appropriate for
I'm OK with it (and its dependency on MarkupSafe), but willing to be convinced otherwise. |
ok then. @jorisvandenbossche or @TomAugspurger pls merge when satisfied though I would add a big TODO in general on the HTMLFormatter class (about this being converted eventually). |
Seems we have already an issue for this: #11700. Will move some of the discussion from here over there |
thanks @Dr-Irv ! thought we had merged this a while back........ |
Add
tests/formats/test_format.py:TestDataFrameFormatting.test_to_html_multiindex_odd_even_truncate
git diff upstream/master | flake8 --diff