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 wherekis the groupby key andvis the number of rows with that key. If groupby key isNonethen the key part of return is omitted.