pyspark.sql.functions.
unbase64
Decodes a BASE64 encoded string column and returns it as a binary column.
New in version 1.5.0.
Changed in version 3.4.0: Supports Spark Connect.
Column
target column to work on.
encoded string value.
Examples
>>> df = spark.createDataFrame(["U3Bhcms=", ... "UHlTcGFyaw==", ... "UGFuZGFzIEFQSQ=="], "STRING") >>> df.select(unbase64("value")).show() +--------------------+ | unbase64(value)| +--------------------+ | [53 70 61 72 6B]| |[50 79 53 70 61 7...| |[50 61 6E 64 61 7...| +--------------------+