Skip to content
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

HTML repr for empty dataframes is ugly #5562

Closed
ghost opened this issue Nov 20, 2013 · 3 comments
Closed

HTML repr for empty dataframes is ugly #5562

ghost opened this issue Nov 20, 2013 · 3 comments
Labels
IO HTML read_html, to_html, Styler.apply, Styler.applymap Output-Formatting __repr__ of pandas objects, to_string

Comments

@ghost
Copy link

ghost commented Nov 20, 2013

see #5550 (comment)

related #6062

@ghost ghost self-assigned this Jan 10, 2014
@ghost ghost removed their assignment Feb 7, 2014
@jreback jreback modified the milestones: 0.15.0, 0.14.0 Mar 28, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 3, 2015
@TomAugspurger
Copy link
Contributor

Let's keep an eye on jupyter/notebook#1182 and maybe close in favor of that?

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Sep 20, 2016

xref: jupyterlab/jupyterlab#910 and specifically jupyterlab/jupyterlab#910 (comment)

Summary: Jupyter is taking care of a bunch of aesthetic issues in Jupyterlab. There are a few data-related items we can fix:

Ideally NaN would get styled slightly differently. That's particularly important for string column so you can distinguish missing values from the equivalent text.

Can add an extra class to NaN (maybe color, bold, or italicize?). Right now the HTML repr of 'NaN' the string literal and np.nan are identical

The fertility column has varying decimal places

This is python's string repr truncating 7.00 to just 7. I think we have another issue about that, will dig it up.

For columns like pop [large integer] you might want to consider adding commas every 3 digits.

This breaks copy-pastability, but thats pretty fragile, and we have df.to_clipboard() anyway.

@TomAugspurger TomAugspurger modified the milestones: 0.20.0, Next Major Release Sep 20, 2016
@jreback jreback modified the milestones: 0.20.0, Next Major Release Mar 23, 2017
@datapythonista
Copy link
Member

Not sure in which exact Jupyter version the DataFrame is not "ugly" anymore, but now it's rendered as a table. Closing.

@datapythonista datapythonista modified the milestones: Contributions Welcome, No action Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO HTML read_html, to_html, Styler.apply, Styler.applymap Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

No branches or pull requests

3 participants