gt_data_color_by_group
=None, palette=None) gt_data_color_by_group(gt, columns
Perform data cell colorization by group.
The gt_data_color_by_group()
function takes an existing GT
object and adds colors to data cells according to their values within their group (as identified by groupname_col
).
Please refer to GT.data_color
for more details and examples.
Parameters
columns : SelectExpr = None
-
The columns to target. Can either be a single column name or a series of column names provided in a list.
palette : str | list[str] | None = None
-
The color palette to use. This should be a list of colors (e.g.,
["#FF0000", "#00FF00", "#0000FF"]
). A ColorBrewer palette could also be used, just supply the name (reference available in the Color palette access from ColorBrewer section). IfNone
, then a default palette will be used.