pyspark.sql.functions.
factorial
Computes the factorial of the given value.
Examples
>>> df = spark.createDataFrame([(5,)], ['n']) >>> df.select(factorial(df.n).alias('f')).collect() [Row(f=120)]
previous
pyspark.sql.functions.expm1
next
pyspark.sql.functions.floor