Skip to content

polars/polars-collect-then-lazy

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

Collect executes this query before lazy starts a new plan. Keep the operations in one plan when they can run together.

lf.collect().lazy()
lf

The collect call produced a DataFrame and lazy returned a new LazyFrame.

Use xpd check --fix --unsafe-fixes to drop .collect().lazy() when collect takes no arguments.

Collect executes this query before lazy starts a new plan. Keep the operations in one plan when they can run together.

See all rules in the Polars pack.