by alphanullmeric · 3y ago · 0 comments
So no, not a drop in replacement. But not a difficult transition either.
This page explains how Polars differs from Pandas.
https://pola-rs.github.io/polars-book/user-guide/coming_from...
df.with_columns( pl.when(pl.col("c") == 2) .then(pl.col("b")) .otherwise(pl.col("a")).alias("a") )
Seeing the multiple nested pl calls within a single expression just feels odd to me. It's definitely reminiscent of Dplyr but in a much less elegant way.