diff --git a/pandas/core/dtypes/dtypes.py b/pandas/core/dtypes/dtypes.py index f76163cbbd0a1..cfe19125ed717 100644 --- a/pandas/core/dtypes/dtypes.py +++ b/pandas/core/dtypes/dtypes.py @@ -1697,7 +1697,7 @@ def __eq__(self, other: object) -> bool: if isinstance(other, type(self)): subtype = self.subtype == other.subtype - if self._is_na_fill_value: + if self._is_na_fill_value or other._is_na_fill_value: # this case is complicated by two things: # SparseDtype(float, float(nan)) == SparseDtype(float, np.nan) # SparseDtype(float, np.nan) != SparseDtype(float, pd.NaT)