← greater operator page · comparison/greater/ds_ds/manual_ex_3
pandas ✅ · DuckDB ✅
DS_2 > DS_3: the measures of two data sets, data point by data point.
Greater than, Example 3, output verbatim: "The operator > returns true if left is greater than right, false otherwise." The page adds that "if the Me_1 column for Germany in the DS_2 or DS_3 Data Set had a null value the result would be null for Germany (G)".
bool_var is false for G (7.1 against 7.5) and true for R (42.5 against 33.7).
DS_r:= DS_2 > DS_3;
| Id_1 | Id_2 | Id_3 | Id_4 | Me_1 |
|---|---|---|---|---|
| G | Total | Percentage | Total | 7.1 |
| R | Total | Percentage | Total | 42.5 |
{
"datasets": [
{
"name": "DS_2",
"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": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Id_3 | Id_4 | Me_1 |
|---|---|---|---|---|
| G | Total | Percentage | Total | 7.5 |
| R | Total | Percentage | Total | 33.7 |
{
"datasets": [
{
"name": "DS_3",
"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": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Id_3 | Id_4 | bool_var |
|---|---|---|---|---|
| G | Total | Percentage | Total | false |
| R | Total | Percentage | Total | true |
{
"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"}
]
}
]
}