themed_gt#
- popo.plotting.tables.themed_gt(gt, n_rows=None, width='100%', decimals=None)#
Apply popo’s table style to a Great Tables table or a DataFrame.
Call this last, after headers, spanners and formatting. Passing a
pd.DataFrameis a shortcut forthemed_gt(GT(df), n_rows=len(df)); a non-default index (bus names, element names) is kept as the first column rather than silently dropped.- Parameters:
gt (
GT|DataFrame) – AnyGTtable, or a DataFrame to wrap withGT()first.n_rows (
int|None) – Number of body rows, used for the alternating row stripes. Inferred for a DataFrame.width (
str) – CSS width of the table.decimals (
int|None) – If set andgtis a DataFrame, format every float column to this many decimal places.
- Return type:
GT- Returns:
The styled table.