Filter type: None#
- class lumen.transforms.base.Filter(*, conditions, controls, name)#
Filter transform implement the filtering behavior of Filter components.
The filter conditions must be declared as a list of tuple containing the name of the column to be filtered and one of the following:
scalar: A scalar value will be matched using equality operators
tuple: A tuple value specifies a numeric or date range.
list: A list value specifies a set of categories to match against.
list(tuple): A list of tuples specifies a list of ranges.
Parameters#
type: list[Any]
default: []
List of filter conditions expressed as tuples of the columnname and the filter value.
Methods#
- Filter.apply(df: DataFrame) DataFrame #
Given a table transform it in some way and return it.
- Parameters:
table (DataFrame) – The queried table as a DataFrame.
- Returns:
A DataFrame containing the transformed data.
- Return type:
DataFrame
- Filter.to_spec(context: Dict[str, Any] | None = None) Dict[str, Any] #
Exports the full specification to reconstruct this component.
- Return type:
Resolved and instantiated Component object