snowflake.snowpark.functions.atan2

snowflake.snowpark.functions.atan2(y: Union[Column, str], x: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L1793-L1810)

Computes the inverse tangent (arc tangent) of its input; the result is a number in the interval [-pi, pi].

Example::
>>> from snowflake.snowpark.types import DecimalType
>>> df = session.create_dataframe([[1, 2]], schema=["x", "y"])
>>> df.select(atan2(df.x, df.y).cast(DecimalType(scale=3)).alias("result")).show()
------------
|"RESULT"  |
------------
|0.464     |
------------
Copy
语言: 中文