ray.data.grouped_data.GroupedData.count#
- GroupedData.count() Dataset [source]#
Compute count aggregation.
Examples
>>> import ray >>> ray.data.from_items([ ... {"A": x % 3, "B": x} for x in range(100)]).groupby( ... "A").count()
- Returns:
A dataset of
[k, v]
columns wherek
is the groupby key andv
is the number of rows with that key. If groupby key isNone
then the key part of return is omitted.