-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: add render_links for Styler.to_html formatting #45058
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
Please note I added the LaTeX equivalent, so the signature is now consistent with the Also note I changed the argument name to |
@@ -798,6 +798,7 @@ def format( | |||
decimal: str = ".", | |||
thousands: str | None = None, | |||
escape: str | None = None, | |||
hyperlinks: str | None = None, |
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.
is there a reason we prefer this to render_links
?
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.
My arguments: hyperlink
is a bit more specific whereas link
can be a general term in certain contexts. And, technically, everything is rendered so why not add render
to every kwarg. And rendering is somewhat of an esoteric concept outside of graphics processing.
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.
ok fair
thanks @attack68 |
i was not sure if there was an actual issue for this (aside from the discussion), if so can you link. |
This came about as a requirement for converting DataFrame.to_html into Styler.to_html, citing @jorisvandenbossche in favour of the functionality.
Note that the
DataFrame.to_html
render_links
argument is rather limited to just detecting only a URL in a cell.The function added for Styler here is a more general pattern search, and it allows the result to be viewed in Jupyter Notebook directly, which the precursor does not.