How can I generate appropriate HTML to hand to an ipywidgets.HTML
object to properly display a Pandas DataFrame?
This can be achieved with the lovely new DataFrame.style
class.
For example
This example depends on bootstrap's CSS being loaded on the page. It's included in the notebook when you're running the notebook interactively.
More generally a mixture of set_table_attributes
to give it a class, and set_table_styles
for more specific items should give pretty fine-grained controls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With