← cast operator page · general/cast/integer_to_string/digits_and_sign
pandas ✅ · DuckDB ✅
cast(Me_1, string) on an Integer measure, without a mask: the default format.
Type conversion: "From integer: the integer value is printed as a sequence of digits, without any leading zeroes or thousands separators, possibly preceded by a -."
1500 with no thousands separator, -7 preceded by -, and 0.
DS_r := DS_1[calc Me_2 := cast(Me_1, string)];
| Id_1 | Me_1 |
|---|---|
| 1 | 1500 |
| 2 | -7 |
| 3 | 0 |
{
"datasets": [
{
"name": "DS_1",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier", "nullable": false},
{"name": "Me_1", "type": "Integer", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Me_1 | Me_2 |
|---|---|---|
| 1 | 1500 | 1500 |
| 2 | -7 | -7 |
| 3 | 0 | 0 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Me_1", "type": "Integer", "role": "Measure"},
{"name": "Me_2", "type": "String", "role": "Measure"}
]
}
]
}