Loading...

vastorbit.sql.functions.exp

vastorbit.sql.functions.exp(expr: Annotated[str | list[str] | StringSQL | list[StringSQL], '']) StringSQL

Exponential.

Parameters:

expr (SQLExpression) – Expression.

Returns:

SQL string.

Return type:

StringSQL

Examples

First, let’s import the VastFrame in order to create a dummy dataset.

from vastorbit import VastFrame

Now, let’s import the vastorbit SQL functions.

import vastorbit.sql.functions as vof

We can now build a dummy dataset.

df = VastFrame({"x": [11.4, -2.5, 3.5, -4.2]})

Now, let’s go ahead and apply the function.

df["exp_x"] = vof.exp(df["x"])
display(df)
123
x
Decimal(3,1)
100%
123
exp_x
Double
100%
1-2.50.0820849986238988
2-4.20.014995576820477703
33.533.11545195869231
411.489321.72336080558

Note

It’s crucial to utilize vastorbit SQL functions in coding, as they can be updated over time with new syntax. While SQL functions typically remain stable, they may vary across platforms or versions. vastorbit effectively manages these changes, a task not achievable with pure SQL.

See also

VastFrame.eval() : Evaluates the expression.