Skip to content

Commit 45f37b1

Browse files
committed
Update README.md [ci skip]
1 parent 5ed827f commit 45f37b1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff 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

309309
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

Comments
 (0)