modin/pandas/series.py
def reset_index(
        self, level=None, drop=False, name=None, inplace=False
    ):  # noqa: PR01, RT01, D200
        """
        Generate a new Series with the index reset.
        """
        if drop and level is None:
            new_idx = pandas.RangeIndex(len(self.index))
            if inplace:
                self.index = new_idx
                self.name = name or self.name
            else:
                result = self.copy()
                result.index = new_idx
                return result
        elif not drop and inplace:
            raise TypeError(
                "Cannot reset_index inplace on a Series to create a DataFrame"
            )
        else:
            obj = self.copy()
            if name is not None:
                obj.name = name
            from .dataframe import DataFrame

            return DataFrame(obj).reset_index(level=level, drop=drop, inplace=inplace)

        Generate a new Series with the index reset.
        
Generate a new Series with the index reset.
Generate a new Series with the index reset .
def reset_index(
        self, level=None, drop=False, name=None, inplace=False
    ):  
        if drop and level is None:
            new_idx = pandas.RangeIndex(len(self.index))
            if inplace:
                self.index = new_idx
                self.name = name or self.name
            else:
                result = self.copy()
                result.index = new_idx
                return result
        elif not drop and inplace:
            raise TypeError(
                "Cannot reset_index inplace on a Series to create a DataFrame"
            )
        else:
            obj = self.copy()
            if name is not None:
                obj.name = name
            from .dataframe import DataFrame
            return DataFrame(obj).reset_index(level=level, drop=drop, inplace=inplace)
def reset_index ( self , level = None , drop = False , name = None , inplace = False ) : if drop and level is None : new_idx = pandas . RangeIndex ( len ( self . index ) ) if inplace : self . index = new_idx self . name = name or self . name else : result = self . copy ( ) result . index = new_idx return result elif not drop and inplace : raise TypeError ( "Cannot reset_index inplace on a Series to create a DataFrame" ) else : obj = self . copy ( ) if name is not None : obj . name = name from . dataframe import DataFrame return DataFrame ( obj ) . reset_index ( level = level , drop = drop , inplace = inplace )
Generate a new Series with the index reset.
Generate a new Series with the index reset .
# noqa: PR01, RT01, D200 """
        Generate a new Series with the index reset.
        """
self
level
drop
name
inplace