-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
RegressionFunctionality that used to work in a prior pandas versionFunctionality that used to work in a prior pandas versionTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite
Milestone
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
Metadata
Metadata
Assignees
Labels
RegressionFunctionality that used to work in a prior pandas versionFunctionality that used to work in a prior pandas versionTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite