def within_range(df, items=None):
    for k, (lower, upper) in items.items():
        if (lower > df[k]).any() or (upper < df[k]).any():
            bad = (lower > df[k]) | (upper < df[k])
            raise AssertionError("Outside range", bad)
    return df
Convert an object into an Variable
dataset/ETHPy150Open TomAugspurger/engarde/engarde/checks.py/within_range--crossover with--dataset/ETHPy150Open pydata/xarray/xarray/core/variable.py/as_variable