pyspark.sql.functions.sha1

pyspark.sql.functions.sha1(col: ColumnOrName) → pyspark.sql.column.Column

Returns the hex string result of SHA-1.

Examples

>>> spark.createDataFrame([('ABC',)], ['a']).select(sha1('a').alias('hash')).collect()
[Row(hash='3c01bdbb26f358bab27f267924aa2c9a03fcfdb8')]