← subtraction operator page · numeric/subtraction/sc_ds/scalar_minuend
pandas ✅ · DuckDB ✅
every measure of a dataset subtracted from a scalar, so the order matters.
Subtraction: op1 is "the minuend" and op2 is "the subtrahend".
10 - DS_1: Me_1 (Integer) 8, 6 and 5; Me_2 (Number) 7.5, 6.0 and 9.5.
DS_r := 10 - DS_1;
| Id_1 | Me_1 | Me_2 |
|---|---|---|
| 1 | 2 | 2.5 |
| 2 | 4 | 4.0 |
| 3 | 5 | 0.5 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "Integer", "role": "Measure", "nullable": true},
{"name": "Me_2", "type": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Me_1 | Me_2 |
|---|---|---|
| 1 | 8 | 7.500000 |
| 2 | 6 | 6.000000 |
| 3 | 5 | 9.500000 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Me_1", "type": "Integer", "role": "Measure"},
{"name": "Me_2", "type": "Number", "role": "Measure"}
]
}
]
}