Skip to content

BUG: to_html misses truncation indicators (...) when index=False #15019

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

Closed
jorisvandenbossche opened this issue Dec 31, 2016 · 2 comments · Fixed by #22786
Closed

BUG: to_html misses truncation indicators (...) when index=False #15019

jorisvandenbossche opened this issue Dec 31, 2016 · 2 comments · Fixed by #22786
Labels
Bug IO HTML read_html, to_html, Styler.apply, Styler.applymap
Milestone

Comments

@jorisvandenbossche
Copy link
Member

When the html output is truncated (by using mmax_rows=..), you get ... to indicate this, but not when using index=False:

df = pd.DataFrame(np.random.randn(5,2))
df.to_html(max_rows=4, index=False)

screenshot from 2016-12-31 11-02-49

cc @TomAugspurger follow-up from #14999

@simonjayhawkins
Copy link
Member

to_html misses truncation indicators (...) when index=False

and when index=True and max_rows=1 which is inconsistent with max_cols=1 behavior:

image

@simonjayhawkins
Copy link
Member

Reproducible code sample to use as test case:

Code Sample

np.random.seed(seed=0)
df = pd.DataFrame(np.random.randn(5,2))
df.to_html(max_rows=4, index=False)

Output

0 1
1.764052 0.400157
0.978738 2.240893
0.950088 -0.151357
-0.103219 0.410599

Expected Output

0 1
1.764052 0.400157
0.978738 2.240893
... ...
0.950088 -0.151357
-0.103219 0.410599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO HTML read_html, to_html, Styler.apply, Styler.applymap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants