FormatDocs

internal interface FormatDocs

Formats the specified columns or cells within this dataframe such that they have specific CSS attributes applied to them when rendering the dataframe to HTML.

This function does not immediately produce a FormattedFrame, but instead it selects the columns to be formatted and returns a FormatClause which serves as an intermediate step.

This can include column groups and nested columns.

See Selecting Columns.

The FormatClause allows you to further narrow down the selection to individual cells by selecting only certain rows, using where, and then finally specify how to format the cells using with, perRowCol, or linearBg.

You can continue formatting the FormattedFrame by calling format on it again.

Specifying a column group makes all of its inner columns be formatted in the same way unless overridden.

Formatting is done additively, meaning you can add more formatting to a cell that's already formatted or override certain attributes inherited from its outer group.

Specifying a frame column at the moment does nothing (Issue #1375), convert each nested DataFrame to a FormattedFrame instead:

df.convert { myFrameCol }.with {
it.format { someCol }.with { background(green) }
}.toStandaloneHtml()

Check out the Grammar.

For more information: See format on the documentation website.

Types

Link copied to clipboard

Selecting columns for various DataFrame operations can be done in the following ways:

Link copied to clipboard
interface Grammar