pyspark.sql.Column.bitwiseXOR β PySpark 3.5.5 documentation (original) (raw)
Column.
bitwiseXOR
(other: Union[Column, LiteralType, DecimalLiteral, DateTimeLiteral]) β ColumnΒΆ
Compute bitwise XOR of this expression with another expression.
Changed in version 3.4.0: Supports Spark Connect.
Parameters
other
a value or Column to calculate bitwise xor(^) with this Column.
Examples
from pyspark.sql import Row df = spark.createDataFrame([Row(a=170, b=75)]) df.select(df.a.bitwiseXOR(df.b)).collect() [Row((a ^ b)=225)]