pandas.api.extensions.ExtensionArray._reduce#
- ExtensionArray._reduce(name, *, skipna=True, keepdims=False, **kwargs)[source]#
Return a scalar result of performing the reduction operation.
- Parameters:
- namestr
Name of the function, supported values are: { any, all, min, max, sum, mean, median, prod, std, var, sem, kurt, skew }.
- skipnabool, default True
If True, skip NaN values.
- keepdimsbool, default False
If False, a scalar is returned. If True, the result has dimension with size one along the reduced axis.
- **kwargs
Additional keyword arguments passed to the reduction function. Currently, ddof is the only supported kwarg.
- Returns:
- scalar
- Raises:
- TypeErrorsubclass does not define operations
Examples
>>> pd.array([1, 2, 3])._reduce("min") 1