rules/polars/polars-assert-frame-equals.md

Polars DataFrame.equals returned True on equal values with Int32 and Int64 columns. Use assert_frame_equal to check dtypes and report the differences.

diff
1-assert df.equals(other)
2+pl.testing.assert_frame_equal(df, other)

What the rule reports

equals returned True. assert_frame_equal raised AssertionError for Int32 against Int64.

How to fix it

Use xpd check --fix --unsafe-fixes to rewrite assert df.equals(other) to pl.testing.assert_frame_equal(df, other) after checking the intended result.