modin/pandas/series.py
def sum(
        self,
        axis=None,
        skipna=None,
        level=None,
        numeric_only=None,
        min_count=0,
        **kwargs,
    ):  # noqa: PR01, RT01, D200
        """
        Return the sum of the values.
        """
        axis = self._get_axis_number(axis)
        if skipna is None:
            skipna = True
        if numeric_only is True:
            raise NotImplementedError("Series.sum does not implement numeric_only")
        if level is not None:
            if (
                not self._query_compiler.has_multiindex(axis=axis)
                and level > 0
                or level < -1
                and level != self.index.name
            ):
                raise ValueError("level > 0 or level < -1 only valid with MultiIndex")
            return self.groupby(level=level, axis=axis, sort=False).sum(
                numeric_only=numeric_only, min_count=min_count, **kwargs
            )

        new_index = self.columns if axis else self.index
        if min_count > len(new_index):
            return np.nan

        data = self._validate_dtypes_sum_prod_mean(
            axis, numeric_only, ignore_axis=False
        )
        if min_count > 1:
            return data._reduce_dimension(
                data._query_compiler.sum_min_count(
                    axis=axis,
                    skipna=skipna,
                    level=level,
                    numeric_only=numeric_only,
                    min_count=min_count,
                    **kwargs,
                )
            )
        return data._reduce_dimension(
            data._query_compiler.sum(
                axis=axis,
                skipna=skipna,
                level=level,
                numeric_only=numeric_only,
                min_count=min_count,
                **kwargs,
            )
        )

        Return the sum of the values.
        
Return the sum of the values.
Return the sum of the values .
def sum(
        self,
        axis=None,
        skipna=None,
        level=None,
        numeric_only=None,
        min_count=0,
        **kwargs,
    ):  
        axis = self._get_axis_number(axis)
        if skipna is None:
            skipna = True
        if numeric_only is True:
            raise NotImplementedError("Series.sum does not implement numeric_only")
        if level is not None:
            if (
                not self._query_compiler.has_multiindex(axis=axis)
                and level > 0
                or level < -1
                and level != self.index.name
            ):
                raise ValueError("level > 0 or level < -1 only valid with MultiIndex")
            return self.groupby(level=level, axis=axis, sort=False).sum(
                numeric_only=numeric_only, min_count=min_count, **kwargs
            )
        new_index = self.columns if axis else self.index
        if min_count > len(new_index):
            return np.nan
        data = self._validate_dtypes_sum_prod_mean(
            axis, numeric_only, ignore_axis=False
        )
        if min_count > 1:
            return data._reduce_dimension(
                data._query_compiler.sum_min_count(
                    axis=axis,
                    skipna=skipna,
                    level=level,
                    numeric_only=numeric_only,
                    min_count=min_count,
                    **kwargs,
                )
            )
        return data._reduce_dimension(
            data._query_compiler.sum(
                axis=axis,
                skipna=skipna,
                level=level,
                numeric_only=numeric_only,
                min_count=min_count,
                **kwargs,
            )
        )
def sum ( self , axis = None , skipna = None , level = None , numeric_only = None , min_count = 0 , ** kwargs , ) : axis = self . _get_axis_number ( axis ) if skipna is None : skipna = True if numeric_only is True : raise NotImplementedError ( "Series.sum does not implement numeric_only" ) if level is not None : if ( not self . _query_compiler . has_multiindex ( axis = axis ) and level > 0 or level < - 1 and level != self . index . name ) : raise ValueError ( "level > 0 or level < -1 only valid with MultiIndex" ) return self . groupby ( level = level , axis = axis , sort = False ) . sum ( numeric_only = numeric_only , min_count = min_count , ** kwargs ) new_index = self . columns if axis else self . index if min_count > len ( new_index ) : return np . nan data = self . _validate_dtypes_sum_prod_mean ( axis , numeric_only , ignore_axis = False ) if min_count > 1 : return data . _reduce_dimension ( data . _query_compiler . sum_min_count ( axis = axis , skipna = skipna , level = level , numeric_only = numeric_only , min_count = min_count , ** kwargs , ) ) return data . _reduce_dimension ( data . _query_compiler . sum ( axis = axis , skipna = skipna , level = level , numeric_only = numeric_only , min_count = min_count , ** kwargs , ) )
Return the sum of the values.
Return the sum of the values .
# noqa: PR01, RT01, D200 """
        Return the sum of the values.
        """
self
axis
skipna
level
numeric_only
min_count