snowflake.snowpark.functions.boolxor_agg¶
- snowflake.snowpark.functions.boolxor_agg(expr: Union[snowflake.snowpark.column.Column, str]) Column[source]¶
Returns the logical XOR of all non-None records in a group. If all records inside a group are None, returns None.
- Parameters:
expr (ColumnOrName) – The boolean values to aggregate.
- Returns:
The logical XOR result of all non-None boolean values in the group.
- Return type:
Examples:
>>> df = session.create_dataframe([ ... [True], ... [False], ... [False], ... [False] ... ], schema=["col1"]) >>> df.select(boolxor_agg(df["col1"])).collect() [Row(BOOLXOR_AGG("COL1")=True)] >>> df = session.create_dataframe([ ... [True], ... [True], ... [False], ... [False] ... ], schema=["col1"]) >>> df.select(boolxor_agg(df["col1"])).collect() [Row(BOOLXOR_AGG("COL1")=False)] >>> df = session.create_dataframe([ ... [False], ... [False], ... [False], ... [False] ... ], schema=["col1"]) >>> df.select(boolxor_agg(df["col1"])).collect() [Row(BOOLXOR_AGG("COL1")=False)]