BPt.Dataset.rename#
- Dataset.rename(mapper=None, index=None, columns=None, axis=None, copy=True, inplace=False, level=None, errors='ignore')[source]#
Calls method according to: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.rename.html
This version is updated to reflect changes to meta-data after renaming, e.g., scopes will be updated to their new name accordingly.
- Parameters
- mapperdict-like or function, optional
Dict-like or function transformations to apply to that axis’ values. Use either mapper and axis to specify the axis to target with mapper, or index and columns.
default = None
- indexdict-like or function, optional
Alternative to specifying axis (mapper, axis=0 is equivalent to index=mapper).
default = None
- columnsdict-like or function, optional
Alternative to specifying axis (mapper, axis=1 is equivalent to columns=mapper).
default = None
- axis{0 or ‘index’, 1 or ‘columns’}, optional
Axis to target with mapper. Can be either the axis name (‘index’, ‘columns’) or number (0, 1). The default is ‘index’.
default = 0
- copybool, optional
Also copy underlying data.
default = True
- inplacebool, optional
Whether to return a new
Dataset
. If True then value of copy is ignored.default = False
- levelint or level name, optional
In case of a MultiIndex, only rename labels in the specified level.
default = None
- errors{‘ignore’, ‘raise’}, optional
If ‘raise’, raise a KeyError when a dict-like mapper, index, or columns contains labels that are not present in the Index being transformed. If ‘ignore’, existing keys will be renamed and extra keys will be ignored.
default = 'ignore'