turicreate.aggregate.
DISTINCT
Builtin distinct values for groupby. Returns a list of distinct values.
>>> sf.groupby("user", ... {'rating_distinct':tc.aggregate.DISTINCT('rating')})