snowflake.snowpark.functions.nullifzero

snowflake.snowpark.functions.nullifzero(e: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.39.1/src/snowflake/snowpark/functions.py#L2186-L2196)

Returns NULL if the argument evaluates to 0; otherwise, returns the argument.

Example::
>>> df = session.create_dataframe([0, 1], schema=["a"])
>>> df.select(nullifzero(df["a"]).alias("result")).collect()
[Row(RESULT=None), Row(RESULT=1)]
Copy
Language: English