RenameAxis type: rename_axis#
- class lumen.transforms.base.RenameAxis(*, axis, columns, copy, index, mapper, controls, name)#
Set the name of the axis for the index or columns, see pandas.DataFrame.rename_axis.
- df.rename_axis(mapper=<mapper>, columns=<columns>, index=<index>,
axis=<axis>, copy=<copy>)
Parameters#
type: int | str
default: 0
The axis to rename. 0 or ‘index’, 1 or ‘columns’
type: str | list | dict
default: None
A scalar, list-like, dict-like to apply to that axis’ values.Note that the columns parameter is not allowed if the objectis a Series. This parameter only apply for DataFrame type objects.Use either mapper and axis to specify the axis to target withmapper, or index and/or columns.
type: bool
default: True
Also copy underlying data.
type: str | list | dict
default: None
A scalar, list-like, dict-like to apply to that axis’ values.Note that the columns parameter is not allowed if the objectis a Series. This parameter only apply for DataFrame type objects.Use either mapper and axis to specify the axis to target withmapper, or index and/or columns.
type: str | list
default: None
Value to set the axis name attribute.
Methods#
- RenameAxis.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
- RenameAxis.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