# xarray.computation.rolling.DatasetCoarsen.reduce

#### DatasetCoarsen.reduce(func, keep_attrs=None, \*\*kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/computation/rolling.py#L1508-L1532)

Reduce the items in this group by applying func along some
dimension(s).

* **Parameters:**
  * **func** ([`callable()`](https://docs.python.org/3/builtins/functions.html#callable)) – Function which can be called in the form func(x, axis, \*\*kwargs)
    to return the result of collapsing an np.ndarray over the coarsening
    dimensions.  It must be possible to provide the axis argument with
    a tuple of integers.
  * **keep_attrs** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), *default*: [`None`](https://docs.python.org/3/builtins/constants.html#None)) – If True, the attributes (`attrs`) will be copied from the original
    object to the new one. If False, the new object will be returned
    without attributes. If None uses the global default.
  * **\*\*kwargs** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)) – Additional keyword arguments passed on to func.
* **Returns:**
  **reduced** ([`Dataset`](xarray.Dataset.html.md#xarray.Dataset)) – Arrays with summarized data.
