polars.Expr.filter

Expr.filter(predicate: polars.internals.expr.Expr) polars.internals.expr.Expr

Filter a single column. Mostly useful in in aggregation context. If you want to filter on a DataFrame level, use LazyFrame.filter.

Parameters
predicate

Boolean expression.