← division operator page · numeric/division/sc_comp/scalar_dividend
pandas ✅ · DuckDB ✅
a scalar divided by a component, so the order matters.
Division: op1 is "the dividend" and op2 is "the divisor", and "The result has type number."
Me_3 = 10 / Me_1 is 5.0, 2.5 and 2.0, a Number; the other components are kept.
DS_r := DS_1[calc Me_3 := 10 / Me_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 | Me_3 |
|---|---|---|---|
| 1 | 2 | 2.500000 | 5.000000 |
| 2 | 4 | 4.000000 | 2.500000 |
| 3 | 5 | 0.500000 | 2.000000 |
{
"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"},
{"name": "Me_3", "type": "Number", "role": "Measure"}
]
}
]
}