Query type: query#
- class lumen.transforms.base.Query(*, query, controls, name)#
Query applies the pandas.DataFrame.query method.
df.query(<query>)
Parameters#
query
type: str
default: ''
The query to apply to the table.
Methods#
- Query.apply(table: 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
- Query.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