toHtml
DataFrame
instances can be rendered to HTML. Rendering of hierarchical tables in HTML is supported by JS and CSS definitions that can be found in project resources.
Dataframes can also be formatted before being converted to HTML. See format for how to do this.
Depending on your environment, there can be different ways to use the result of toHtml
functions.
IntelliJ IDEA
Working with the result
The following function produces HTML that includes JS and CSS definitions. It can be displayed in the browser and has parameters for customization.
Composing multiple tables
toHtml
and toStandaloneHtml
return composable DataFrameHtmlData
, which you can use to include additional scripts, elements, or styles at the end of the page or just to merge multiple tables into one HTML snippet.
Jupyter Notebooks
Configuring display for individual output
toHtml
is useful if you want to configure how a single cell is displayed. To configure the display for the entire notebook, please refer to the Jupyter Notebooks section.