Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
(Signed) shift the given value numBits right.
For the corresponding Databricks SQL function, see shiftright function.
Syntax
from pyspark.sql import functions as dbf
dbf.shiftright(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 values.
Examples
from pyspark.sql import functions as dbf
spark.range(4).select("*", dbf.shiftright('id', 1)).show()