You are viewing documentation about an older version (1.16.0). View latest version

snowflake.snowpark.functions.abs

snowflake.snowpark.functions.abs(e: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L1719-L1733)

Returns the absolute value of a numeric expression.

Example::
>>> df = session.create_dataframe([[-1]], schema=["a"])
>>> df.select(abs(col("a")).alias("result")).show()
------------
|"RESULT"  |
------------
|1         |
------------
Copy
Language: English