turicreate.aggregate.FREQ_COUNT

turicreate.aggregate.FREQ_COUNT(src_column)

Builtin frequency counts for groupby. Returns a dictionary where the key is the src_column and the value is the number of times each value occurs.

>>> sf.groupby("user",
...       {'rating_distinct':tc.aggregate.FREQ_COUNT('rating')})