pyspark.sql.udf.UserDefinedFunction#

class pyspark.sql.udf.UserDefinedFunction(func, returnType=StringType(), name=None, evalType=100, deterministic=True, bufferSchema=None)[source]#

User defined function in Python

Added in version 1.3.

Notes

The constructor of this class is not supposed to be directly called. Use pyspark.sql.functions.udf() or pyspark.sql.functions.pandas_udf() to create this instance.

Methods

asNondeterministic()

Updates UserDefinedFunction to nondeterministic.

Attributes