With loc.grand_summary() we can target the cells containing the grand summary data. 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
columns:SelectExpr=None
The columns to target. Can either be a single column name or a series of column names provided in a list.
rows:RowSelectExpr=None
The rows to target. Can either be a single row name or a series of row names provided in a list. Note that if rows are targeted by index, top and bottom grand summary rows are indexed as one combined list starting with the top rows.
A LocGrandSummary object, which is used for a locations= argument if specifying the table’s grand summary rows.
Examples
Let’s use a subset of the gtcars dataset in a new table. We will style all of the grand summary cells by using locations=loc.grand_summary() within tab_style().