Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Computes the BASE64 encoding of a binary column and returns it as a string column.
For the corresponding Databricks SQL function, see base64 function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.base64(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
target column to work on. |
Returns
pyspark.sql.Column: BASE64 encoding of string value.
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame(["Spark", "PySpark", "Pandas API"], "STRING")
df.select("*", dbf.base64("value")).show()