pyspark.sql.functions.sha#
- pyspark.sql.functions.sha(col)[source]#
Returns a sha1 hash value as a hex string of the col.
New in version 3.5.0.
- Parameters
- col
Column
or str
- col
Examples
>>> import pyspark.sql.functions as sf >>> spark.range(1).select(sf.sha(sf.lit("Spark"))).show() +--------------------+ | sha(Spark)| +--------------------+ |85f5955f4b27a9a4c...| +--------------------+