We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 914364f commit 0c05e46Copy full SHA for 0c05e46
lectures/polars.md
@@ -381,7 +381,7 @@ df.with_columns(
381
382
```{code-cell} ipython3
383
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
+ pl.when(pl.col('cg') == pl.col('cg').max()) # pick the largest cg value
385
.then(None) # set to null
386
.otherwise(pl.col('cg')) # otherwise keep the value in the cg column
387
.alias('cg') # update the column with name cg
0 commit comments