modin.pandas.Series.rename_axis¶
- Series.rename_axis(mapper=_NoDefault.no_default, *, index=_NoDefault.no_default, axis=0, copy=True, inplace=False) Optional[Series][source] (https://github.com/snowflakedb/snowpark-python/blob/v1.30.0/snowpark-python/.tox/docs/lib/python3.9/site-packages/modin/pandas/series.py#L1640-L1654)¶
- Set the name of the axis for the index or columns. - Parameters:
- mapper (scalar, list-like, optional) – Value to set the axis name attribute. 
- index (scalar, list-like, dict-like or function, optional) – - A scalar, list-like, dict-like or functions transformations to apply to that axis’ values. - Use either - mapperand- axisto specify the axis to target with- mapper, or- index.
- axis ({0 or 'index', 1 or 'columns'}, default 0) – The axis to rename. For Series this parameter is unused and defaults to 0. 
- copy (bool, default None) – Also copy underlying data. This parameter is ignored in Snowpark pandas. 
- inplace (bool, default False) – Modifies the object directly, instead of creating a new Series. 
 
- Returns:
- Series, or None if - inplace=True.
- Return type:
- Series or None 
 - Examples - Series - >>> s = pd.Series(["dog", "cat", "monkey"]) >>> s 0 dog 1 cat 2 monkey dtype: object >>> s.rename_axis("animal") animal 0 dog 1 cat 2 monkey dtype: object