pyspark.sql.functions.
sha1
Returns the hex string result of SHA-1.
New in version 1.5.0.
Changed in version 3.4.0: Supports Spark Connect.
Column
target column to compute on.
the column for computed results.
Examples
>>> spark.createDataFrame([('ABC',)], ['a']).select(sha1('a').alias('hash')).collect() [Row(hash='3c01bdbb26f358bab27f267924aa2c9a03fcfdb8')]