Skip to content

polars/polars-builtin-on-expr-or-series

Pack Severity Fix Versions
Polars error unsafe, with xpd check --fix --unsafe-fixes All versions

Polars 2.1.0 raises TypeError when this Python builtin tries to size or iterate an Expr. Use the corresponding expression method.

len(expr)
expr.len()

Five TypeError results on Expr. All five builtins worked on Series.

Use xpd check --fix --unsafe-fixes to replace the Python builtin with the matching Polars expression method.

Polars 2.1.0 raises TypeError when this Python builtin tries to size or iterate an Expr. Use the corresponding expression method.

See all rules in the Polars pack.