← floor operator page · numeric/floor/ds/one_number_measure
pandas ✅ · DuckDB ✅
floor on a dataset with one Number measure, which becomes an Integer measure.
Floor gives an Integer, and in the Typical behaviours, "Operators changing the data type", the measure whose type changes is replaced: "A default generic Measure is assigned by default to the result Data Set, depending on the data type of the result", int_var for an Integer.
int_var, an Integer: 7.2, -3.7 and 5.0 give 7, -4 and 5. The page's Example 1, on two Number measures, keeps their names.
DS_r := floor(DS_1);
| Id_1 | Me_1 |
|---|---|
| 1 | 7.2 |
| 2 | -3.7 |
| 3 | 5.0 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | int_var |
|---|---|
| 1 | 7 |
| 2 | -4 |
| 3 | 5 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "int_var", "type": "Integer", "role": "Measure"}
]
}
]
}