Loading...

vastorbit.sql.functions.tan

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

Trigonometric Tangent.

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": [3.1415, 6, 4.5, 7]})

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

df["tan_x"] = vof.tan(df["x"])
display(df)
123
x
Decimal(14,4)
100%
123
tan_x
Double
100%
14.54.637332054551185
23.1415-9.265359005819132e-05
37.00.8714479827243187
46.0-0.29100619138474915

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.