shiftleft
Shift the given value numBits left.
For the corresponding Databricks SQL function, see shiftleft function.
Syntax
Python
from pyspark.databricks.sql import functions as dbf
dbf.shiftleft(col=<col>, numBits=<numBits>)
Parameters
Parameter | Type | Description |
|---|---|---|
|
| input column of values to shift. |
|
| number of bits to shift. |
Returns
pyspark.sql.Column: shifted value.
Examples
Python
from pyspark.databricks.sql import functions as dbf
spark.range(4).select("*", dbf.shiftleft('id', 1)).show()