def asof(self, label):
        try:
            loc = self.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]
For a sorted index, return the most recent label up to and including
dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index.asof