bigframes.pandas.api.typing.DataFrameGroupBy.max#

DataFrameGroupBy.max(numeric_only: bool = False, *args) DataFrame[source]#

Compute max of group values.

Examples:

For SeriesGroupBy:

>>> lst = ['a', 'a', 'b', 'b']
>>> ser = bpd.Series([1, 2, 3, 4], index=lst)
>>> ser.groupby(level=0).max()
a     2
b     4
dtype: Int64

For DataFrameGroupBy:

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

[2 rows x 2 columns]
Parameters:
  • numeric_only (bool, default False) – Include only float, int, boolean columns.

  • min_count (int, default 0) – The required number of valid values to perform the operation. If fewer than min_count and non-NA values are present, the result will be NA.

Returns:

Computed max of values within each group.

Return type:

bigframes.pandas.DataFrame or bigframes.pandas.Series