turicreate.aggregate.SELECT_ONE¶
-
turicreate.aggregate.
SELECT_ONE
(src_column)¶ Builtin aggregator for groupby which selects one row in the group.
Example: Get one rating row from a user.
>>> sf.groupby("user", ... {'rating':tc.aggregate.SELECT_ONE('rating')})
If multiple columns are selected, they are guaranteed to come from the same row. for instance: >>> sf.groupby(“user”, … {‘rating’:tc.aggregate.SELECT_ONE(‘rating’)}, … {‘item’:tc.aggregate.SELECT_ONE(‘item’)})
The selected ‘rating’ and ‘item’ value for each user will come from the same row in the SFrame.