← not_equal operator page · comparison/not_equal/comp_sc/manual_ex_2
pandas ✅ · DuckDB ✅
Me_1 <> 7.5 inside calc, where the new measure Me_2 takes the result.
Not equal to, Example 2, output verbatim: "The operator returns false if the left is equal to right, true otherwise."
Me_2 is true for G, where 7.1 differs from 7.5, and null for R, whose Me_1 is null; Me_1 is kept.
DS_r := DS_1 [ calc Me_2 := Me_1<>7.5 ];
| Id_1 | Id_2 | Id_3 | Id_4 | Me_1 |
|---|---|---|---|---|
| G | Total | Percentage | Total | 7.1 |
| R | Total | Percentage | Total |
{
"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": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Id_3 | Id_4 | Me_1 | Me_2 |
|---|---|---|---|---|---|
| G | Total | Percentage | Total | 7.1 | true |
| R | Total | Percentage | Total |
{
"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": "Me_1", "type": "Number", "role": "Measure"},
{"name": "Me_2", "type": "Boolean", "role": "Measure"}
]
}
]
}