polars/polars-silent-dtype-coercion
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| Polars | warning | none, edit by hand | All versions |
Use a strict Polars cast so invalid values raise instead of becoming nulls.
frame = frame.with_columns(pl.col('amount').cast(pl.Float64, strict=False))frame = frame.with_columns(pl.col('amount').cast(pl.Float64))Diagnostic message
Section titled “Diagnostic message”Check invalid values before casting so they are not silently replaced with nulls.See all rules in the Polars pack.