ray.data.grouped_data.GroupedData#

class ray.data.grouped_data.GroupedData(dataset: Dataset, key: str | List[str])[source]#

Represents a grouped dataset created by calling Dataset.groupby().

The actual groupby is deferred until an aggregation is applied.

Methods

__init__

Construct a dataset grouped by key (internal API).

aggregate

Implements an accumulator-based aggregation.

count

Compute count aggregation.

map_groups

Apply the given function to each group of records of this dataset.

max

Compute grouped max aggregation.

mean

Compute grouped mean aggregation.

min

Compute grouped min aggregation.

std

Compute grouped standard deviation aggregation.

sum

Compute grouped sum aggregation.