pyspark.sql.functions.bitmap_bucket_number#

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

Returns the bucket number 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_bucket_number(df.a).alias("r")).collect()
[Row(r=1)]