Polars 2 · Basics
Filter rows
Keep rows that match a condition. Combine conditions with & and |.
df.filter((pl.col("age") > 30) & (pl.col("team") == "a"))
Official Polars 2 documentation
Polars 2 · Basics
Keep rows that match a condition. Combine conditions with & and |.
df.filter((pl.col("age") > 30) & (pl.col("team") == "a"))
Official Polars 2 documentation
Was this page helpful?