pyspark.sql.Column.bitwiseAND

Column.bitwiseAND(other)

Compute bitwise AND of this expression with another expression.

Parameters:
other

a value or Column to calculate bitwise and(&) with this Column.

Examples

>>> from pyspark.sql import Row
>>> df = spark.createDataFrame([Row(a=170, b=75)])
>>> df.select(df.a.bitwiseAND(df.b)).collect()
[Row((a & b)=10)]