← not operator page · boolean/not/comp/true_false_and_null_values
pandas ✅ · DuckDB ✅
DS_1[calc Me_2 := not Me_1]: a component Me_1 that is true, false and null.
Logical negation: "not false gives true", "not true gives false" and "not null gives null"; the page's sentence "returns true if op is false, otherwise true" has a typo ("otherwise true" would make not true true) and ignores null, and the listed rows govern.
Me_2 is false, true and null: not true is false, not false is true and not null is null.
DS_r := DS_1[calc Me_2 := not Me_1];
| Id_1 | Me_1 |
|---|---|
| 1 | true |
| 2 | false |
| 3 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "Boolean", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Me_1 | Me_2 |
|---|---|---|
| 1 | true | false |
| 2 | false | true |
| 3 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Me_1", "type": "Boolean", "role": "Measure"},
{"name": "Me_2", "type": "Boolean", "role": "Measure"}
]
}
]
}