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

snowflake.snowpark.functions.nullifzero

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

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
语言: 中文