Loading...

verticapy.sql.functions.atan

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

Trigonometric Inverse Tangent.

Parameters

expr: SQLExpression

Expression.

Returns

StringSQL

SQL string.

Examples

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

from verticapy import vDataFrame

Now, let’s import the VerticaPy SQL functions.

import verticapy.sql.functions as vpf

We can now build a dummy dataset.

df = vDataFrame({"x": [0, -1, 0.7, 0.5]})

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

df["atan_x"] = vpf.atan(df["x"])
display(df)
123
x
Numeric(21)
100%
123
atan_x
Float(22)
100%
10.00.0
2-1.0-0.785398163397448
30.70.610725964389209
40.50.463647609000806

Note

It’s crucial to utilize VerticaPy 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. VerticaPy effectively manages these changes, a task not achievable with pure SQL.

See also

vDataFrame.eval() : Evaluates the expression.