You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oleksandr Zaytsev edited this page Jan 10, 2018
·
1 revision
All code in this section will be based on Tipping dataset
df :=DataFrame loadTips.
The simplest example of applying a groupBy: operator is grouping the values of a series by the values of another one of the same size.
bill := tips column:#total_bill.
sex := tips column:#sex.
bill groupBy: sex.
The result of this query will be an object of DataSeriesGrouped, which splits the bill into two series, mapped to the unique 'Male' and 'Female' values of sex series.
Since most of the time the series that are grouped are both columns of a same data frame, there is a handy shortcut
tips group:#total_billby:#sex.
The result of groupBy: operator is rather useless unless combined with