File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -307,3 +307,23 @@ This query will return a data frame will all 5 columns of Iris dataset and 6 row
307307```
308308
309309The previous query will return you only the ` petal_width ` and ` petal_length ` columns of this data frame. Try it yourself!
310+
311+ ### Aggregation and Grouping
312+ ``` smalltalk
313+ df select: #(sepal_length species)
314+ where: [ :petal_length :petal_width |
315+ (petal_length < 4.9 and: petal_length > 1.6) and:
316+ (petal_width < 0.4 or: petal_width > 1.5) ]
317+ groupBy: #species
318+ aggregate: #sum.
319+ ```
320+
321+ The result of this query will be a data frame with a single column
322+
323+ ```
324+ | sepal_length
325+ ------------+--------------
326+ setosa | 15.9
327+ versicolor | 18.2
328+ virginica | 17.1
329+ ```
You can’t perform that action at this time.
0 commit comments