หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Shift the given value numBits left.
For the corresponding Databricks SQL function, see shiftleft function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.shiftleft(col=<col>, numBits=<numBits>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
input column of values to shift. |
numBits |
int |
number of bits to shift. |
Returns
pyspark.sql.Column: shifted value.
Examples
from pyspark.databricks.sql import functions as dbf
spark.range(4).select("*", dbf.shiftleft('id', 1)).show()