snowflake.snowpark.functions.nullifzero¶

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

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