← exp operator page · numeric/exp/comp/manual_ex_2
pandas ✅ · DuckDB ✅
exp on a component inside calc, where the result replaces the measure Me_1.
Exponential, Example 2, output verbatim: "The operator exp returns e (base of the natural logarithm) raised to the op-th power."
Me_1 = exp(Me_1) is 148.4131591025766, 2980.9579870417283 and 7.38905609893065; Me_2 is unchanged.
DS_r := DS_1 [ calc Me_1 := exp ( Me_1 ) ];
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 5 | 0.7545 |
| 10 | B | 8 | 13.45 |
| 11 | A | 2 | 1.87 |
{
"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 | 148.4131591025766 | 0.7545 |
| 10 | B | 2980.9579870417283 | 13.45 |
| 11 | A | 7.38905609893065 | 1.87 |
{
"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"}
]
}
]
}