modin/pandas/series.py
def rename(
        self,
        index=None,
        *,
        axis=None,
        copy=True,
        inplace=False,
        level=None,
        errors="ignore",
    ):  # noqa: PR01, RT01, D200
        """
        Alter Series index labels or name.
        """
        non_mapping = is_scalar(index) or (
            is_list_like(index) and not is_dict_like(index)
        )
        if non_mapping:
            if inplace:
                self.name = index
            else:
                self_cp = self.copy()
                self_cp.name = index
                return self_cp
        else:
            from .dataframe import DataFrame

            result = DataFrame(self.copy()).rename(index=index).squeeze(axis=1)
            result.name = self.name
            return result

        Alter Series index labels or name.
        
Alter Series index labels or name.
Alter Series index labels or name .
def rename(
        self,
        index=None,
        *,
        axis=None,
        copy=True,
        inplace=False,
        level=None,
        errors="ignore",
    ):  
        non_mapping = is_scalar(index) or (
            is_list_like(index) and not is_dict_like(index)
        )
        if non_mapping:
            if inplace:
                self.name = index
            else:
                self_cp = self.copy()
                self_cp.name = index
                return self_cp
        else:
            from .dataframe import DataFrame
            result = DataFrame(self.copy()).rename(index=index).squeeze(axis=1)
            result.name = self.name
            return result
def rename ( self , index = None , * , axis = None , copy = True , inplace = False , level = None , errors = "ignore" , ) : non_mapping = is_scalar ( index ) or ( is_list_like ( index ) and not is_dict_like ( index ) ) if non_mapping : if inplace : self . name = index else : self_cp = self . copy ( ) self_cp . name = index return self_cp else : from . dataframe import DataFrame result = DataFrame ( self . copy ( ) ) . rename ( index = index ) . squeeze ( axis = 1 ) result . name = self . name return result
Alter Series index labels or name.
Alter Series index labels or name .
# noqa: PR01, RT01, D200 """
        Alter Series index labels or name.
        """
self
index
axis
copy
inplace
level
errors