pyspark.sql.functions.
unhex
Inverse of hex. Interprets each pair of characters as a hexadecimal number and converts to the byte representation of number.
>>> spark.createDataFrame([('414243',)], ['a']).select(unhex('a')).collect() [Row(unhex(a)=bytearray(b'ABC'))]
New in version 1.5.