

def asof(self, label):
    "\n        For a sorted index, return the most recent label up to and including\n        the passed label. Return NaN if not found.\n\n        See also\n        --------\n        get_loc : asof is a thin wrapper around get_loc with method='pad'\n        "
    try:
        loc = loc.get_loc(label, method='pad')
    except KeyError:
        return _get_na_value(self.dtype)
    else:
        if isinstance(loc, slice):
            loc = loc.indices(len(self))[(- 1)]
        return self[loc]

dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py Index.asof/VarMisuse@20/118 `self`->`loc`