Unstack type: unstack#
- class lumen.transforms.base.Unstack(*, fill_value, level, controls, name)#
Unstack applies pandas.DataFrame.unstack to the declared level.
df.unstack(<level>)
Parameters#
fill_value
type: int | str | dict
default: None
Replace NaN with this value if the unstack produces missing values.
level
type: int | list | str
default: -1
The indexes to unstack.
Methods#
- Unstack.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
- Unstack.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