Skip to content

Commit 7c3e1ed

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lectures/polars.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,9 @@ df.filter(pl.col('cc') == pl.col('cc').max())
290290
When we only want to look at certain columns of a selected sub-dataframe, we can combine filter with select.
291291

292292
```{code-cell} ipython3
293-
df.filter((pl.col('cc') + pl.col('cg') >= 80) & (pl.col('POP') <= 20000)).select(['country', 'year', 'POP'])
293+
df.filter(
294+
(pl.col('cc') + pl.col('cg') >= 80) & (pl.col('POP') <= 20000)
295+
).select(['country', 'year', 'POP'])
294296
```
295297

296298
**Application: Subsetting Dataframe**

0 commit comments

Comments
 (0)