← ceil operator page · numeric/ceil/ds/manual_ex_1
pandas ✅ · DuckDB ✅
ceil on every measure of DS_1: Number measures become Integer measures with the same names.
Ceiling, Example 1, output verbatim: "The operator ceil returns the smallest integer greater than or equal to op."
Me_1 7.0, 0.1, -32.2 and 44.5 give 7, 1, -32 and 45; Me_2 5.9, -5.0, 17.7 and -0.3 give 6, -5, 18 and 0.
DS_r := ceil (DS_1);
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 7.0 | 5.9 |
| 10 | B | 0.1 | -5.0 |
| 11 | A | -32.2 | 17.7 |
| 11 | B | 44.5 | -0.3 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Id_2", "type": "String", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "Number", "role": "Measure", "nullable": true},
{"name": "Me_2", "type": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 7 | 6 |
| 10 | B | 1 | -5 |
| 11 | A | -32 | 18 |
| 11 | B | 45 | 0 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Id_2", "type": "String", "role": "Identifier"},
{"name": "Me_1", "type": "Integer", "role": "Measure"},
{"name": "Me_2", "type": "Integer", "role": "Measure"}
]
}
]
}