-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Missing ellipsis cells in pivot_table.to_html when limited by max_cols and len(rows) > 1 #6131
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
Comments
This looks fixed; output formatting for dataframes has changed since this version though. A test would be good to confirm |
using pandas 0.23.0 i appear to get the desired behaviour however, i came to the issue from #15019, so decided to add index=False to the output |
If you're up for contributing a test @simonjayhawkins to confirm this behavior, it would be much appreciated! |
the column misalignment in Out[4] and Out[5] above is a separate issue. This was fixed for a column MultiIndex in #8452. adding an index MultiIndex to the same example appears to still gives the column offset bug. so this should probably be raised as a new issue? |
Sure thing; you can open a new issue. Please use code snippets and not pictures of code as it's harder to reproduce. |
Opened #22579 for the column misalignment. |
@mroeschke currently in def test_to_html_truncate_multi_index(self):
pytest.skip("unreliable on travis")
arrays = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]
df = DataFrame(index=arrays, columns=arrays)
fmt.set_option('display.max_rows', 7)
fmt.set_option('display.max_columns', 7)
result = df._repr_html_()
expected = '''\
... which tests that: produces: which I think covers this issue. so i'm thinking that adding another test may not be necessary? |
Although these tests look similar, it would still be good to confirm that the |
This renders like this:

while this:
renders like this:

As you can see in the first table, there are no ellipsis cells like in the second one.
I inspected the code to find the reason for this bug but couldn't find…
The text was updated successfully, but these errors were encountered: