pyspark.sql.functions.bitmap_bit_position#

pyspark.sql.functions.bitmap_bit_position(col)[source]#

Returns the bit position for the given input column.

New in version 3.5.0.

Parameters
colColumn or str

The input column.

Examples

>>> df = spark.createDataFrame([(123,)], ["a"])
>>> df.select(bitmap_bit_position(df.a).alias("r")).collect()
[Row(r=122)]