pyspark.sql.functions.shiftleft

pyspark.sql.functions.shiftleft(col: ColumnOrName, numBits: int) → pyspark.sql.column.Column

Shift the given value numBits left.

Examples

>>> spark.createDataFrame([(21,)], ['a']).select(shiftleft('a', 1).alias('r')).collect()
[Row(r=42)]