We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ed827f commit 45f37b1Copy full SHA for 45f37b1
1 file changed
README.md
@@ -307,3 +307,23 @@ This query will return a data frame will all 5 columns of Iris dataset and 6 row
307
```
308
309
The 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
0 commit comments