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"])>>>s0       dog1       cat2    monkeydtype: string
>>>s.rename_axis("animal")animal0       dog1       cat2    monkeydtype: string

DataFrame

>>>df=bpd.DataFrame({"num_legs":[4,4,2],..."num_arms":[0,0,2]},...["dog","cat","monkey"])>>>df        num_legs  num_armsdog            4         0cat            4         0monkey         2         2[3 rows x 2 columns]
>>>df=df.rename_axis("animal")>>>df        num_legs  num_armsanimaldog            4         0cat            4         0monkey         2         2[3 rows x 2 columns]
Returns:

The same type as the caller.

Return type:

bigframes.pandas.Series orbigframes.pandas.DataFrame