rhino_health.lib.metrics.filter_variable#

Module Contents#

Classes#

FilterType

Enum/Constants to specify the type of filtering to perform. Supported filtering methods are listed below

FilterRangePair

Specifies the upper or lower range to check against when using ranges instead of a fixed number

FilterBetweenRange

Specifies the upper and lower range to check against when using ranges instead of a fixed number

FilterVariable

Defines filter logic to compare data against.

Attributes#

FilterVariableTypeOrColumnName

Either a string or a FilterVariable. Union[str, FilterVariable]

class rhino_health.lib.metrics.filter_variable.FilterType#

Bases: enum.Enum

Enum/Constants to specify the type of filtering to perform. Supported filtering methods are listed below

EQUAL = '='#
IN = 'in'#

Filter data

Notes

filter_value should be a list which can be checked against using pd.Series.isin()

NOT_IN = 'not in'#

Filter data

Notes

filter_value should be a list which can be checked against using pd.Series.isin()

GREATER_THAN = '>'#
LESS_THAN = '<'#
GREATER_THAN_EQUAL = '>='#
LESS_THAN_EQUAL = '<='#
BETWEEN = 'between'#
class rhino_health.lib.metrics.filter_variable.FilterRangePair(**data: Any)#

Bases: pydantic.BaseModel

Specifies the upper or lower range to check against when using ranges instead of a fixed number

filter_value: Any#
filter_type: FilterType#

Warning

FilterType.BETWEEN and FilterType.IN are not supported in FilterRangePair

class rhino_health.lib.metrics.filter_variable.FilterBetweenRange(**data: Any)#

Bases: pydantic.BaseModel

Specifies the upper and lower range to check against when using ranges instead of a fixed number

lower: FilterRangePair#
upper: FilterRangePair#
class rhino_health.lib.metrics.filter_variable.FilterVariable(**data: Any)#

Bases: pydantic.BaseModel

Defines filter logic to compare data against.

data_column: str#

The column in the remote Dataset df to get data from after filtering

filter_column: str#

The column in the remote Dataset df to check against

filter_value: Any | FilterBetweenRange#

The value to match against or a FilterBetweenRange if filter_type is FilterType.BETWEEN

filter_type: FilterType | None#

The type of filtering to perform. Defaults to FilterType.EQUAL

rhino_health.lib.metrics.filter_variable.FilterVariableTypeOrColumnName#

Either a string or a FilterVariable. Union[str, FilterVariable]