← not operator page · boolean/not/ds/true_false_and_null_values
pandas ✅ · DuckDB ✅
not DS_1: a data set with Me_1 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_1 is false, true and null: not true is false, not false is true and not null is null.
DS_r := not DS_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 |
|---|---|
| 1 | false |
| 2 | true |
| 3 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Me_1", "type": "Boolean", "role": "Measure"}
]
}
]
}