Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Returns the rightmost len(len can be string type) characters from the string str, if len is less or equal than 0 the result is an empty string.
For the corresponding Databricks SQL function, see right function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.right(str=<str>, len=<len>)
Parameters
| Parameter | Type | Description |
|---|---|---|
str |
pyspark.sql.Column or str |
Input column or strings. |
len |
pyspark.sql.Column or str |
Input column or strings, the rightmost len. |
Examples
df = spark.createDataFrame([("Spark SQL", 3,)], ['a', 'b'])
df.select(right(df.a, df.b).alias('r')).collect()
[Row(r='SQL')]