-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: #8750 add Series support for to_html and _repr_html_ #10300
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
Conversation
return df._repr_html_(*args, **kwargs) | ||
|
||
def to_html(self, *args, **kwargs): | ||
df = self.to_frame() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be a call of _repr_html_
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have called DataFrame's _repr_html in Series _repr_html and DataFrame's to_html in Series to_html.
If you look at the test case they have 2 different behaviours/outcomes.
Do you recommend only calling _repr_html in both cases and the behaviour being inconsistent with the DataFrame behaviour?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry. I overlooked differences.
@lexual Could you add a image showing what the new |
Looking through your code, I see that you are basically just calling |
@lexual can you rebase & add a whatsnew note. |
@lexual can you update according to comments |
@lexual like to put this in 0.17.1. can you rebase/update |
@jreback Given the last comment of @shoyer above (#10300 (comment)), I don't think this is ready for inclusion in 0.17.1. We should first figure out how we want it to look like (needs to be a distinction from dataframe with one column) |
3739ad6
to
5e0d2c7
Compare
@jreback have rebased, let us know if merge-able, or needs reworking ;) |
Can you show how the output looks like? |
@lexual I think we would like to put this in, but I agree that it can't look like a 1-column frame, maybe same but no header? |
5e0d2c7
to
969fabe
Compare
@lexual can you show a render of this? |
can you update |
@lexual can you update? |
@lexual can you rebase / update |
can you rebase/update. |
@lexual can you rebase / update |
can you rebase / update? |
It's nice if you can meet v0.19.0. Otherwise allow me to work this on. |
Closing this, @sinhrks I think you can go ahead (or rebase this one). But see also the comments above that are not yet resolved I think from @shoyer and me:
|
Apologies haven't been able to respond or rebase as requested in the past. Did this get merged, or just closed? Does it need major surgery to get merged, or just rebase & possibly tidy up? Thanks ;) |
I don't think @sinhrks has started on this yet, but he can tell you for sure. It has not been merged but was closed because it was stale. If you are interested in working on this again we can reopen. The important thing to figure out first (maybe in the linked issue) is what the HTML repr should actually look like. |
The styling of HTML tables in the jupyter notebook is provided by the jupyter CSS itself. From this perspective, the HTMl repr simply needs to have a well formed table format with |
@ellisonbg Technically there is indeed no problem, just having |
closes #5563