Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
Returns the hex string result of SHA-1. Supports Spark Connect.
For the corresponding Databricks SQL function, see sha1 function.
Syntax
from pyspark.sql import functions as dbf
dbf.sha1(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.sha1('a')).show(truncate=False)
+---+----------------------------------------+
|a |sha1(a) |
+---+----------------------------------------+
|ABC|3c01bdbb26f358bab27f267924aa2c9a03fcfdb8|
+---+----------------------------------------+