← between operator page · comparison/between/ds_sc_sc/manual_ex_1
pandas ✅ · DuckDB ✅
between(DS_1, 5, 10): every measure value of DS_1 against two scalar limits.
Between, Example 1, output verbatim: "The operator returns true if op is greater than or equal to from and lower than or equal to to."
bool_var is true for G (6) and false for R (-2).
DS_r:= between(DS_1, 5, 10);
| Id_1 | Id_2 | Id_3 | Id_4 | Me_1 |
|---|---|---|---|---|
| G | Total | Percentage | Total | 6 |
| R | Total | Percentage | Total | -2 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Id_2", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Id_3", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Id_4", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "Integer", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Id_3 | Id_4 | bool_var |
|---|---|---|---|---|
| G | Total | Percentage | Total | true |
| R | Total | Percentage | Total | false |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "String", "role": "Identifier"},
{"name": "Id_2", "type": "String", "role": "Identifier"},
{"name": "Id_3", "type": "String", "role": "Identifier"},
{"name": "Id_4", "type": "String", "role": "Identifier"},
{"name": "bool_var", "type": "Boolean", "role": "Measure"}
]
}
]
}