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

snowflake.snowpark.functions.negate¶

snowflake.snowpark.functions.negate(e: Union[Column, str]) → Column[source]¶

Returns the negation of the value in the column (equivalent to a unary minus).

Example:

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