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

Remove hard coded border property in pandas to_html() #11563

Closed
raivivek opened this issue Nov 10, 2015 · 6 comments
Closed

Remove hard coded border property in pandas to_html() #11563

raivivek opened this issue Nov 10, 2015 · 6 comments
Labels
Output-Formatting __repr__ of pandas objects, to_string
Milestone

Comments

@raivivek
Copy link

Hi,

https://github.com/pydata/pandas/blob/e4cb0f8a6cbb5f0c89b24783baa44326e4b2cccb/pandas/core/format.py#L893

Currently, a border="0" seems to be hard coded in the pandas to_html() table output. I think it'd be more convenient to have that as a CSS property on dataframe than put directly like that.

@jreback
Copy link
Contributor

jreback commented Nov 10, 2015

this will be trivial to change/remove with #10250 , but I don't think we would remove it by default, this is pretty far ingrained.

@TomAugspurger

@jreback jreback added the Output-Formatting __repr__ of pandas objects, to_string label Nov 10, 2015
@jreback
Copy link
Contributor

jreback commented Nov 10, 2015

We also discussed essentially having an option that creates the default HTML output, which a user could override.

@raivivek
Copy link
Author

So, #10250 will take care of it, is it? Interesting development. Sounds cool.

@TomAugspurger
Copy link
Contributor

Yeah it should handle this. Right now I've got something like

screen shot 2015-11-09 at 7 39 00 pm

I need to cleanup the template a bit. If you have specific needs feel free to post them over in #10250.

@jreback
Copy link
Contributor

jreback commented Nov 10, 2015

yeh, so need to make a default styler that implements the current spec (then can take out the hard coded stuff)

@TomAugspurger
Copy link
Contributor

One other thing is my Stylers pretty inefficient. We'll need to get it hooked into the truncated repr before we can hope to replace the current DataFrame._repr_html_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

No branches or pull requests

3 participants