With loc.grand_summary_stub() we can target the cells containing the grand summary row labels, which reside in the table stub. 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 rows to target within the grand summary stub. Can either be a single row name or a series of row names provided in a list. If no rows are specified, all grand summary rows are targeted. 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 LocGrandSummaryStub object, which is used for a locations= argument if specifying the table’s grand summary rows’ labels.
Examples
Let’s use a subset of the gtcars dataset in a new table. We will style the entire table grand summary stub (the row labels) by using locations=loc.grand_summary_stub() within tab_style().