Skip to content

Capped selection

CappedSelection #

CappedSelection(
    selections: Sequence[RapidataSelection], max_rapids: int
)

Bases: RapidataSelection

CappedSelection Class

Takes in different selections and caps the amount of rapids that can be shown.

Useful for demographic and conditional validation selections.

Parameters:

Name Type Description Default
selections Sequence[RapidataSelection]

List of selections to cap.

required
max_rapids int

The maximum amount of rapids that can be shown for this selection.

required
Source code in src/rapidata/rapidata_client/selection/capped_selection.py
def __init__(self, selections: Sequence[RapidataSelection], max_rapids: int):
    self.selections = selections
    self.max_rapids = max_rapids