הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
Calculates the MD5 digest and returns the value as a 32 character hex string. Supports Spark Connect.
For the corresponding Databricks SQL function, see md5 function.
Syntax
from pyspark.sql import functions as dbf
dbf.md5(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
Target column to compute on. |
Returns
pyspark.sql.Column: the column for computed results.
Examples
from pyspark.sql import functions as dbf
df = spark.createDataFrame([('ABC',)], ['a'])
df.select('*', dbf.md5('a')).show(truncate=False)
+---+--------------------------------+
|a |md5(a) |
+---+--------------------------------+
|ABC|902fbdd2b1df0c4f70b4a5d23525e932|
+---+--------------------------------+