daft.functions.between#
between #
between(expr: Expression, lower: Expression | int | float, upper: Expression | int | float) -> Expression
Checks if values in the Expression are between lower and upper, inclusive.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expr | Expression | The expression to check | required |
lower | Expression | int | float | Lower bound (inclusive) | required |
upper | Expression | int | float | Upper bound (inclusive) | required |
Returns:
| Name | Type | Description |
|---|---|---|
Expression | Expression | Boolean Expression indicating whether values are between lower and upper, inclusive. |
Examples:
1 2 3 4 5 | |
╭───────╮
│ data │
│ --- │
│ Bool │
╞═══════╡
│ true │
├╌╌╌╌╌╌╌┤
│ true │
├╌╌╌╌╌╌╌┤
│ false │
├╌╌╌╌╌╌╌┤
│ false │
╰───────╯
(Showing first 4 of 4 rows) Source code in daft/functions/numeric.py
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |