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 ASCII character having the binary equivalent to n. If n is larger than 256 the result is equivalent to chr(n % 256).
For the corresponding Databricks SQL function, see chr function.
Syntax
from pyspark.sql import functions as dbf
dbf.chr(n=<n>)
Parameters
| Parameter | Type | Description |
|---|---|---|
n |
pyspark.sql.Column or str |
target column to compute on |
Examples
from pyspark.sql import functions as dbf
spark.range(60, 70).select("*", dbf.chr("id")).show()
+---+-------+
| id|chr(id)|
+---+-------+
| 60| <|
| 61| =|
| 62| >|
| 63| ?|
| 64| @|
| 65| A|
| 66| B|
| 67| C|
| 68| D|
| 69| E|
+---+-------+