Skip to content

polars/polars-assert-frame-equals

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

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

assert df.equals(other)
pl.testing.assert_frame_equal(df, other)

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

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.

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

See all rules in the Polars pack.