Skip to content

Commit

Permalink
Update _locations.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed Dec 11, 2023
1 parent 9f0319f commit 1701074
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions great_tables/_locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@ class LocStub(Loc):
@dataclass
class LocBody(Loc):
# TODO: these can be tidyselectors
"""A location specification for targeting data cells in the table body.
The `loc.body()` class is used to target the data cells in the table body. The class can be used
to apply 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
The columns to target. Can either be a single column name or a series of column names
provided in a list.
rows : list[str | int]
The rows to target. Can either be a single row name or a series of row names provided in a
list.
Returns
-------
LocBody
A LocBody object, which is used for a `locations` argument if specifying the table body.
"""
columns: SelectExpr
rows: list[str] | str

Expand Down

0 comments on commit 1701074

Please sign in to comment.