diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 35014674565ff..d77f973f124b1 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -8024,7 +8024,7 @@ def asof(self, where, subset=None): np.nan, index=self.columns, name=where[0] ) - locs = self.index.asof_locs(where, ~(nulls._values)) + locs = self.index.asof_locs(where, ~cast("DataFrame", nulls._values)) # mask the missing mask = locs == -1