IsBetween / Boolean Layer
Create boolean mask columns indicating if values fall within a specified range defined by constant bounds. Similar to pandas between() or SQL BETWEEN operator.
Common applications:
- Range validation
- Threshold checking
- Age group filtering
- Price range analysis
- Quality control bands
Example with Closed.Both:
Index | Value | Between(10, 20) |
---|---|---|
0 | 5 | false |
1 | 10 | true |
2 | 15 | true |
3 | 20 | true |
4 | null | null |
LowerBound
stringThe constant lower boundary value. Must be compatible with column's numeric type. Examples:
- '0' for non-negative values
- '-273.15' for valid temperatures
- '18' for adult age check
Select
columnThe numeric column to check against the boundaries. Values outside bounds or null will result in false or null respectively in the output mask.
UpperBound
stringThe constant upper boundary value. Must be compatible with column's numeric type and greater than LowerBound
.
Examples:
- '100' for percentage values
- '65' for retirement age
- '1000' for price limits
Closed
enumControls how boundary values are handled in the comparison. Affects whether values exactly matching bounds are included.
Includes both boundary values [lower, upper]. Example: [10, 20] includes 10 and 20
Includes lower bound but excludes upper bound [lower, upper). Example: [10, 20) includes 10 but not 20
Excludes lower bound but includes upper bound (lower, upper]. Example: (10, 20] includes 20 but not 10
Excludes both boundary values (lower, upper). Example: (10, 20) excludes both 10 and 20
AsColumn
nameName for the new column. If not provided, the system generates a unique name. If AsColumn
matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.