# Buggy code
def sum(self, axis=0, *args, **kwargs):
    """
    Sum of non-NA/null values

    Returns
    -------
    sum : float
    """
    nv.validate_sum(args, kwargs)
    valid_vals = self._valid_sp_values
    sp_sum = valid_vals.sum()
    if self._null_fill_value:
        return sp_sum
    else:
        nsparse = self.sp_index.ngaps
        return sp_sum + self.fill_value * nsparse


# Traceback (TypeError)
In [202]: sparse_series.dtype
Out[203]: Sparse[bool, False]

In [208]: sparse_series.value_counts()
Out[208]:
False    51386
True        13
Name: C_3D Printing, dtype: int64

In [209]: sparse_series.sum()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-209-8f6162710840> in <module>
----> 1 sparse_series.sum()

~/anaconda3/envs/idp/lib/python3.6/site-packages/pandas/core/generic.py in stat_func(self, axis, skipna, level, numeric_only, min_count, **kwargs)
10929                                       skipna=skipna, min_count=min_count)
10930         return self._reduce(f, name, axis=axis, skipna=skipna,
10931                             numeric_only=numeric_only, min_count=min_count)
10932
10933     return set_function_name(stat_func, name, cls)

~/anaconda3/envs/idp/lib/python3.6/site-packages/pandas/core/series.py in _reduce(self, op, name, axis, skipna, numeric_only, filter_type, **kwds)
3613         # dispatch to ExtensionArray interface
3614         if isinstance(delegate, ExtensionArray):
-> 3615             return delegate._reduce(name, skipna=skipna, **kwds)
3616         elif is_datetime64_dtype(delegate):
3617             # use DatetimeIndex implementation to handle skipna correctly

~/anaconda3/envs/idp/lib/python3.6/site-packages/pandas/core/arrays/sparse.py in _reduce(self, name, skipna, **kwargs)
1439         kwargs.pop('numeric_only', None)
1440         kwargs.pop('op', None)
-> 1441         return getattr(arr, name)(**kwargs)
1442
1443     def all(self, axis=None, *args, **kwargs):

~/anaconda3/envs/idp/lib/python3.6/site-packages/pandas/core/arrays/sparse.py in sum(self, axis, *args, **kwargs)
1491         sum : float
1492         """
-> 1493         nv.validate_sum(args, kwargs)
1494         valid_vals = self._valid_sp_values
1495         sp_sum = valid_vals.sum()

~/anaconda3/envs/idp/lib/python3.6/site-packages/pandas/compat/numpy/function.py in __call__(self, args, kwargs, fname, max_fname_arg_count, method)
54                 validate_args_and_kwargs(fname, args, kwargs,
55                                          max_fname_arg_count,
---> 56                                          self.defaults)
57             else:
58                 raise ValueError("invalid validation method "

~/anaconda3/envs/idp/lib/python3.6/site-packages/pandas/util/_validators.py in validate_args_and_kwargs(fname, args, kwargs, max_fname_arg_count, compat_args)
216
217     kwargs.update(args_dict)
--> 218     validate_kwargs(fname, kwargs, compat_args)
219
220

~/anaconda3/envs/idp/lib/python3.6/site-packages/pandas/util/_validators.py in validate_kwargs(fname, kwargs, compat_args)
154     """
155     kwds = kwargs.copy()
--> 156     _check_for_invalid_keys(fname, kwargs, compat_args)
157     _check_for_default_values(fname, kwds, compat_args)
158

~/anaconda3/envs/idp/lib/python3.6/site-packages/pandas/util/_validators.py in _check_for_invalid_keys(fname, kwargs, compat_args)
125         raise TypeError(("{fname}() got an unexpected "
126                          "keyword argument '{arg}'".
--> 127                          format(fname=fname, arg=bad_arg)))
128
129

TypeError: sum() got an unexpected keyword argument 'min_count'

In [210]:

# Fixed code
def sum(self, axis: int = 0, min_count: int = 0, *args, **kwargs) -> Scalar:
    """
    Sum of non-NA/null values

    Parameters
    ----------
    axis : int, default 0
        Not Used. NumPy compatibility.
    min_count : int, default 0
        The required number of valid values to perform the summation. If fewer
        than ``min_count`` valid values are present, the result will be the missing
        value indicator for subarray type.
    *args, **kwargs
        Not Used. NumPy compatibility.

    Returns
    -------
    scalar
    """
    nv.validate_sum(args, kwargs)
    valid_vals = self._valid_sp_values
    sp_sum = valid_vals.sum()
    if self._null_fill_value:
        if check_below_min_count(valid_vals.shape, None, min_count):
            return na_value_for_dtype(self.dtype.subtype, compat=False)
        return sp_sum
    else:
        nsparse = self.sp_index.ngaps
        if check_below_min_count(valid_vals.shape, None, min_count - nsparse):
            return na_value_for_dtype(self.dtype.subtype, compat=False)
        return sp_sum + self.fill_value * nsparse