Skip to content

Commit 0c05e46

Browse files
mmckyHumphreyYang
andauthored
Update lectures/polars.md
Co-authored-by: Humphrey Yang <[email protected]>
1 parent 914364f commit 0c05e46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lectures/polars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ df.with_columns(
381381

382382
```{code-cell} ipython3
383383
df_modified = df.with_columns(
384-
pl.when(pl.col('cg') == pl.col('cg').max()) # when a value in the cg column is equal to the max cg value
384+
pl.when(pl.col('cg') == pl.col('cg').max()) # pick the largest cg value
385385
.then(None) # set to null
386386
.otherwise(pl.col('cg')) # otherwise keep the value in the cg column
387387
.alias('cg') # update the column with name cg

0 commit comments

Comments
 (0)