← lower operator page · string/lower/comp/all_caps_and_mixed_case
pandas ✅ · DuckDB ✅
lower of a component inside calc, with an all-capitals value, a mixed-case one and a null.
Character case conversion: "Converts the character case of a string in upper or lower case."
the new measure Me_2 is hello for HELLO and hi there for Hi There; Me_1 is kept. A null operand gives a null result: "most of the scalar operations (arithmetic, logical, and others) return null when any of their arguments is null" (User Manual), as the manual's length and instr examples show.
DS_r := DS_1[calc Me_2 := lower(Me_1)];
| Id_1 | Me_1 |
|---|---|
| 1 | HELLO |
| 2 | Hi There |
| 3 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "String", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Me_1 | Me_2 |
|---|---|---|
| 1 | HELLO | hello |
| 2 | Hi There | hi there |
| 3 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Me_1", "type": "String", "role": "Measure"},
{"name": "Me_2", "type": "String", "role": "Measure"}
]
}
]
}