bigframes.pandas.api.typing.SeriesGroupBy.cummax#
- SeriesGroupBy.cummax(*args, **kwargs) Series[source]#
Cumulative max for each group.
Examples:
For SeriesGroupBy:
>>> lst = ['a', 'a', 'b'] >>> ser = bpd.Series([6, 2, 0], index=lst) >>> ser.groupby(level=0).cummax() a 6 a 6 b 0 dtype: Int64
For DataFrameGroupBy:
>>> data = [[1, 8, 2], [1, 2, 5], [2, 6, 9]] >>> df = bpd.DataFrame(data, columns=["a", "b", "c"], ... index=["fox", "gorilla", "lion"]) >>> df.groupby("a").cummax() b c fox 8 2 gorilla 8 5 lion 6 9 [3 rows x 2 columns]
- Returns:
Cumulative max for each group.
- Return type: