pandas/silent-dtype-coercion
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| pandas | warning | none, edit by hand | All versions |
Inspect invalid and fractional values before converting a pandas column.
amount = pd.to_numeric(raw_amount, errors='coerce')amount = pd.to_numeric(raw_amount, errors='raise')Diagnostic message
Section titled “Diagnostic message”Check invalid or fractional values before casting so they are not silently changed or replaced.See all rules in the pandas pack.