Σημείωση
Η πρόσβαση σε αυτή τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να συνδεθείτε ή να αλλάξετε καταλόγους.
Η πρόσβαση σε αυτή τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να αλλάξετε καταλόγους.
Inverse of hex. Interprets each pair of characters as a hexadecimal number and converts to the byte representation of number. Supports Spark Connect.
For the corresponding Databricks SQL function, see unhex function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.unhex(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or column name |
target column to work on. |
Returns
pyspark.sql.Column: string representation of given hexadecimal value.
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('414243',)], ['a'])
df.select('*', dbf.unhex('a')).show()
+------+----------+
| a| unhex(a)|
+------+----------+
|414243|[41 42 43]|
+------+----------+