# dask.dataframe.api.SeriesGroupBy.max

#### SeriesGroupBy.max(numeric_only=False, \*\*kwargs)

Compute max of group values.

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

Some inconsistencies with the Dask version may exist.

Returns the maximum value for each group. Missing values are
excluded by default but this behavior can be controlled with
the `skipna` parameter.

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

  **min_count**
  : The required number of valid values to perform the operation. If fewer
    than `min_count` non-NA values are present the result will be NA.

  **skipna**
  : Exclude NA/null values. If the entire group is NA and `skipna` is
    `True`, the result will be NA.
    <br/>
    #### Versionchanged
    Changed in version 3.0.0.

  **engine**
  : * `'cython'` : Runs rolling apply through C-extensions from cython.
    * `'numba'`
      : Only available when `raw` is set to `True`.
    * `None`
      : `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}` and will be
        applied to both the `func` and the `apply` groupby aggregation.
* **Returns:**
  Series or DataFrame
  : Computed max of values within each group.

#### SEE ALSO
`Series.max`
: Return the maximum of the values over the requested axis.

`DataFrame.max`
: Return the maximum of the values over the requested axis.

### Examples

For SeriesGroupBy:

```pycon
>>> lst = ["a", "a", "b", "b"]
>>> ser = pd.Series([1, 2, 3, 4], index=lst)
>>> ser
a    1
a    2
b    3
b    4
dtype: int64
>>> ser.groupby(level=0).max()
a    2
b    4
dtype: int64
```

For DataFrameGroupBy:

```pycon
>>> data = [[1, 8, 2], [1, 2, 5], [2, 5, 8], [2, 6, 9]]
>>> df = pd.DataFrame(
...     data,
...     columns=["a", "b", "c"],
...     index=["tiger", "leopard", "cheetah", "lion"],
... )
>>> df
          a  b  c
  tiger   1  8  2
leopard   1  2  5
cheetah   2  5  8
   lion   2  6  9
>>> df.groupby("a").max()
    b  c
a
1   8  5
2   6  9
```

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