diff --git a/pandas/core/generic.py b/pandas/core/generic.py index d77f973f124b1..7c2cc5d33a5db 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -8024,7 +8024,9 @@ def asof(self, where, subset=None): np.nan, index=self.columns, name=where[0] ) - locs = self.index.asof_locs(where, ~cast("DataFrame", nulls._values)) + # error: Unsupported operand type for + # ~ ("ExtensionArray | ndarray[Any, Any] | Any") + locs = self.index.asof_locs(where, ~nulls._values) # type: ignore[operator] # mask the missing mask = locs == -1