snowflake.snowpark.functions.negate¶
- snowflake.snowpark.functions.negate(e: ColumnOrName) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/release-v1.3.0/src/snowflake/snowpark/functions.py#L970-L986)¶
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 | ------------