← sqrt operator page · numeric/sqrt/ds/manual_ex_1
pandas ✅ · DuckDB ✅
sqrt on every measure of DS_1.
Square root, Example 1, output verbatim: "The operator sqrt calculates the square root of a number."
Me_1 16, 81 and 64 give 4.0, 9.0 and 8.0; Me_2 1.5625, 11.2225 and 52.5625 give 1.25, 3.35 and 7.25.
DS_r := sqrt(DS_1);
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 16 | 1.5625 |
| 10 | B | 81 | 11.2225 |
| 11 | A | 64 | 52.5625 |
{
"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": "Integer", "role": "Measure", "nullable": true},
{"name": "Me_2", "type": "Number", "role": "Measure", "nullable": true}
]
}
]
}
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 4.0 | 1.25 |
| 10 | B | 9.0 | 3.35 |
| 11 | A | 8.0 | 7.25 |
{
"datasets": [
{
"name": "DS_r",
"DataStructure": [
{"name": "Id_1", "type": "Integer", "role": "Identifier"},
{"name": "Id_2", "type": "String", "role": "Identifier"},
{"name": "Me_1", "type": "Number", "role": "Measure"},
{"name": "Me_2", "type": "Number", "role": "Measure"}
]
}
]
}