CLN/API: implemented to_html in terms of .style
See original GitHub issueImplement to_html
/ notebook repr based on .style
.
prob need to expand this to take a use
argument (to select the style, needs to be ‘classic’ for a while, to replicate the current .to_html
one).
Issue Analytics
- State:
- Created 8 years ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Making Use of APIs in Your Front End | by Patrick Pierre
So in this post, I am going to help you learn more about APIs and how you can use them through a simple...
Read more >Introduction to web APIs - Learn web development | MDN
Common browser APIs APIs for manipulating documents loaded into the browser. The most obvious example is the DOM (Document Object Model) API, ...
Read more >Best practices for REST API design - Stack Overflow Blog
In this article, we'll look at how to design REST APIs to be easy to understand for anyone consuming them, future-proof, and secure...
Read more >HTML APIs: What They Are And How To Design A Good One
HTML APIs improve collaboration between designers and developers, lift some work from the shoulders of the latter, and enable designers to ...
Read more >The anatomy of an API call | The Uptrends Blog
A simple example is an application that takes in zip codes and returns city and state information. The API client (the user) asks...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@moi90 If the goal is to replicate all of the functionality from
DataFrame.to_html()
then yes it can be done and a lot has already been done in my wip pr. Not all though, because I wanted to raise the issue about simply blindly replicating a function which in some cases produces deprecated HTML, and instead consider the merits of making some changes perhaps with a view to pandas 2.0.@toobaz I progressed the MVP to state where it now has a lot of general conditional styling capability for latex tables. See my response here I still want to be able to add some table level styles like column colouring or odd/even colouring but these are quite easy extensions.
Quite easy, just need to redirect the method, when I push it I will ping you to take a look at test results.
In #45382 I’m proposing changing the signature of
DataFrame.to_latex
to:DataFrame.to_latex(hide, format, format_index, render_kwargs)
and this will perform the following:
DataFrame.style.hide(**hide).format(**format).format_index(**format_index).to_latex(**render_kwargs)
This has the advantage of:
DataFrame.to_latex
since it passes the kwargs throughIs this reasonable and would it be appropriate to aim for something similar with
to_html
for v2.0?