Closed
Description
Noticed this from the geopandas CI, but on the latest released version, the following works:
df1 = pd.DataFrame({"col": [1, 2, 3]})
df2 = df1.astype("Int64")
# expected error by default
>>> pd.testing.assert_frame_equal(df1, df2)
...
AssertionError: Attributes of DataFrame.iloc[:, 0] (column name="col") are different
Attribute "dtype" are different
[left]: int64
[right]: Int64
# but the assertion passes with check_dtype=False
>>> pd.testing.assert_frame_equal(df1, df2, check_dtype=False)
On main we however get the following for this second check:
>>> pd.testing.assert_frame_equal(df1, df2, check_dtype=False)
...
AssertionError: DataFrame.iloc[:, 0] (column name="col") are different
DataFrame.iloc[:, 0] (column name="col") classes are different
[left]: ndarray
[right]: IntegerArray