← not operator page · boolean/not/ds/manual_ex_1

Manual example 1 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

not DS_1 on a data set with one boolean measure.

Manual:

Logical negation, Example 1, output verbatim: "not false gives true" and "not true gives false".

Expected:

the page's six data points: Me_1 is the negation of the operand's Me_1 on each one.

script.vtl ⇩

DS_r:= not DS_1;

input/DS_1.csv ⇩

Id_1Id_2Id_3Id_4Me_1
M15B2013True
M64B2013False
M65B2013True
F15U2013False
F64U2013False
F65U2013True

input/DS_1.json ⇩

{
  "datasets": [
    {
      "name": "DS_1",
      "DataStructure": [
        {"name": "Id_1", "type": "String", "role": "Identifier", "nullable": false},
        {"name": "Id_2", "type": "Integer", "role": "Identifier", "nullable": false},
        {"name": "Id_3", "type": "String", "role": "Identifier", "nullable": false},
        {"name": "Id_4", "type": "Time_Period", "role": "Identifier", "nullable": false},
        {"name": "Me_1", "type": "Boolean", "role": "Measure", "nullable": true}
      ]
    }
  ]
}

expected/DS_r.csv ⇩

Id_1Id_2Id_3Id_4Me_1
M15B2013false
M64B2013true
M65B2013false
F15U2013true
F64U2013true
F65U2013false

expected/DS_r.json ⇩

{
  "datasets": [
    {
      "name": "DS_r",
      "DataStructure": [
        {"name": "Id_1", "type": "String", "role": "Identifier"},
        {"name": "Id_2", "type": "Integer", "role": "Identifier"},
        {"name": "Id_3", "type": "String", "role": "Identifier"},
        {"name": "Id_4", "type": "Time_Period", "role": "Identifier"},
        {"name": "Me_1", "type": "Boolean", "role": "Measure"}
      ]
    }
  ]
}