-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Missing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arraysNeeds TestsUnit test(s) needed to prevent regressionsUnit test(s) needed to prevent regressionsTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suitegood first issue
Description
Discovered in #31799
I couldn't reproduce this without using a np.* NaT sentinel...
>>> idx1 = pd.Index([pd.NA, np.datetime64("nat")])
>>> idx2 = pd.Index([pd.NA, pd.NaT])
>>> tm.assert_index_equal(idx1, idx2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/williamayd/clones/pandas/pandas/_testing.py", line 689, in assert_index_equal
diff = np.sum((left.values != right.values).astype(int)) * 100.0 / len(left)
AttributeError: 'bool' object has no attribute 'astype'
Metadata
Metadata
Assignees
Labels
Missing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arraysNeeds TestsUnit test(s) needed to prevent regressionsUnit test(s) needed to prevent regressionsTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suitegood first issue