chr
Retorna o caractere ASCII que possui o equivalente binário a n. Se n for maior que 256, o resultado é equivalente a chr(n % 256).
Para a função Databricks SQL correspondente, consulte a funçãochr.
Sintaxe
Python
from pyspark.databricks.sql import functions as dbf
dbf.chr(n=<n>)
Parâmetros
Parâmetro | Tipo | Descrição |
|---|---|---|
|
| coluna de destino para compute |
Exemplos
Python
from pyspark.databricks.sql import functions as dbf
spark.range(60, 70).select("*", dbf.chr("id")).show()
Output
+---+-------+
| id|chr(id)|
+---+-------+
| 60| <|
| 61| =|
| 62| >|
| 63| ?|
| 64| @|
| 65| A|
| 66| B|
| 67| C|
| 68| D|
| 69| E|
+---+-------+