turicreate.aggregate.MEAN

turicreate.aggregate.MEAN(src_column)

Builtin average aggregator for groupby. Synonym for tc.aggregate.AVG. If src_column is of array type, and if array’s do not match in length a NoneType is returned in the destination column.

Example: Get the average rating of each user.

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