← floor operator page · numeric/floor/ds/manual_ex_1
pandas ✅ · DuckDB ✅
floor on every measure of DS_1: Number measures become Integer measures with the same names.
Floor, Example 1, output verbatim: "The operator floor returns the greatest integer which is smaller than or equal to op."
Me_1 7.0, 0.1, -32.2 and 44.5 give 7, 0, -33 and 44; Me_2 5.9, -5.0, 17.7 and -0.3 give 5, -5, 17 and -1.
DS_r := floor ( 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 | 5 |
| 10 | B | 0 | -5 |
| 11 | A | -33 | 17 |
| 11 | B | 44 | -1 |
{
"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"}
]
}
]
}