# dask.dataframe.api.SeriesGroupBy.mean

#### SeriesGroupBy.mean(numeric_only=False, split_out=None, \*\*kwargs)

Compute mean of groups, excluding missing values.

This docstring was copied from pandas.core.groupby.groupby.GroupBy.mean.

Some inconsistencies with the Dask version may exist.

Returns the arithmetic mean for each group. Missing values are
ignored unless the entire group is NA, in which case the result
for that group is NA.

* **Parameters:**
  **numeric_only**
  : Include only float, int, boolean columns.
    <br/>
    #### Versionchanged
    Changed in version 2.0.0: numeric_only no longer accepts `None` and defaults to `False`.

  **skipna**
  : Exclude NA/null values. If an entire group is NA, the result will be NA.

  **engine**
  : * `'cython'` : Runs the operation through C-extensions from cython.
    * `'numba'` : Runs the operation through JIT compiled code from numba.
    * `None` : Defaults to `'cython'` or globally setting
      `compute.use_numba`

  **engine_kwargs**
  : * For `'cython'` engine, there are no accepted `engine_kwargs`
    * For `'numba'` engine, the engine can accept  `nogil`
      and `parallel` dictionary keys. The values must either be `True` or
      `False`. The default `engine_kwargs` for the `'numba'` engine is
      `{'nogil': False, 'parallel': False}`
* **Returns:**
  pandas.Series or pandas.DataFrame
  : Mean of values within each group. Same object type as the caller.

#### SEE ALSO
`Series.mean`
: Apply function mean to a Series.

`DataFrame.mean`
: Apply function mean to each row or column of a DataFrame.

### Examples

```pycon
>>> df = pd.DataFrame(
...     {"A": [1, 1, 2, 1, 2], "B": [np.nan, 2, 3, 4, 5], "C": [1, 2, 1, 1, 2]},
...     columns=["A", "B", "C"],
... )
```

Groupby one column and return the mean of the remaining columns in
each group.

```pycon
>>> df.groupby("A").mean()
     B         C
A
1  3.0  1.333333
2  4.0  1.500000
```

Groupby two columns and return the mean of the remaining column.

```pycon
>>> df.groupby(["A", "B"]).mean()
         C
A B
1 2.0  2.0
  4.0  1.0
2 3.0  1.0
  5.0  2.0
```

Groupby one column and return the mean of only particular column in
the group.

```pycon
>>> df.groupby("A")["B"].mean()
A
1    3.0
2    4.0
Name: B, dtype: float64
```

<!-- !! processed by numpydoc !! -->
