You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [24]: arr1 = pd.arrays.FloatingArray(np.array([1.0, np.nan, 2.0]), np.array([False, False, True]))
In [25]: arr1
Out[25]:
<FloatingArray>
[1.0, nan, <NA>]
Length: 3, dtype: Float64
In [26]: arr2 = pd.arrays.FloatingArray(np.array([1.0, np.nan, 2.0]), np.array([False, False, True]))
In [27]: arr1.equals(arr2)
Out[27]: False
For nullable arrays, NAs in the same location are considered equal. For plain float arrays, we consider NaNs as equal. Although for FloatingArray we currently distinguish both NA and NaN, I think we should consider both as equal if in the same location, to preserve the goal of this function (NaN equal to NaN, and NA equal to NA, to be clear, not mixed).
The text was updated successfully, but these errors were encountered:
From #43930 (comment). Currently we have
For nullable arrays, NAs in the same location are considered equal. For plain float arrays, we consider NaNs as equal. Although for FloatingArray we currently distinguish both NA and NaN, I think we should consider both as equal if in the same location, to preserve the goal of this function (NaN equal to NaN, and NA equal to NA, to be clear, not mixed).
The text was updated successfully, but these errors were encountered: