Skip to content

Commit 2e51b8c

Browse files
mmckyHumphreyYang
andauthored
Update lectures/polars.md
Co-authored-by: Humphrey Yang <[email protected]>
1 parent 4fdd052 commit 2e51b8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lectures/polars.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,12 @@ df.filter(pl.col('POP') >= 20000)
256256

257257
In this case, `df.filter()` takes a boolean expression and only returns rows with the `True` values.
258258

259-
We can see this boolean mask by saving the comparison results in the following table.
259+
We can view this boolean mask as a table with the alias `meets_criteria`
260260

261261
```{code-cell} ipython3
262262
df.select(
263-
pl.col('country'), # Include country for reference
264-
(pl.col('POP') >= 20000).alias('meets_criteria') # meets_criteria shows results of the comparison expression
263+
pl.col('country'),
264+
(pl.col('POP') >= 20000).alias('meets_criteria')
265265
)
266266
```
267267

0 commit comments

Comments
 (0)