bigframes.geopandas.GeoSeries.rename_axis#
- GeoSeries.rename_axis(mapper: Hashable | Sequence[Hashable], *, inplace: bool = False, **kwargs) Series | None#
Set the name of the axis for the index or columns.
- Parameters:
mapper (scalar, list-like, optional) – Value to set the axis name attribute.
Examples:
Series
>>> s = bpd.Series(["dog", "cat", "monkey"]) >>> s 0 dog 1 cat 2 monkey dtype: string
>>> s.rename_axis("animal") animal 0 dog 1 cat 2 monkey dtype: string
DataFrame
>>> df = bpd.DataFrame({"num_legs": [4, 4, 2], ... "num_arms": [0, 0, 2]}, ... ["dog", "cat", "monkey"]) >>> df num_legs num_arms dog 4 0 cat 4 0 monkey 2 2 [3 rows x 2 columns]
>>> df = df.rename_axis("animal") >>> df num_legs num_arms animal dog 4 0 cat 4 0 monkey 2 2 [3 rows x 2 columns]
- Returns:
The same type as the caller.
- Return type: