With loc.row_groups() we can target the cells containing the row group labels, which span across the table body. This is useful for applying custom styling with the tab_style() method. That method has a locations= argument and this class should be used there to perform the targeting.
Parameters
rows:RowSelectExpr=None
The row groups to target. Can either be a single group name or a series of group names provided in a list. If no groups are specified, all are targeted.
A LocRowGroups object, which is used for a locations= argument if specifying the table’s row groups.
Examples
Let’s use a subset of the gtcars dataset in a new table. We will style all of the cells comprising the row group labels by using locations=loc.row_groups() within tab_style().