def between(arg, lower, upper): """ Check if the input expr falls between the lower/upper bounds passed. Bounds are inclusive. All arguments must be comparable. Returns ------- is_between : BooleanValue """ lower = _ops.as_value_expr(lower) upper = _ops.as_value_expr(upper) op = _ops.Between(arg, lower, upper) return op.to_expr()
def between( self, lower: Value, upper: Value, ) -> ir.BooleanValue: """Check if this expression is between `lower` and `upper`, inclusive. Parameters ---------- lower Lower bound upper Upper bound Returns ------- BooleanValue Expression indicating membership in the provided range """ import ibis.expr.operations as ops import ibis.expr.rules as rlz return ops.Between(self, rlz.any(lower), rlz.any(upper)).to_expr()