pyspark.sql.udf.UserDefinedFunction¶
-
class
pyspark.sql.udf.
UserDefinedFunction
(func: Callable[[…], Any], returnType: DataTypeOrString = StringType(), name: Optional[str] = None, evalType: int = 100, deterministic: bool = True)[source]¶ User defined function in Python
New in version 1.3.
Notes
The constructor of this class is not supposed to be directly called. Use
pyspark.sql.functions.udf()
orpyspark.sql.functions.pandas_udf()
to create this instance.Methods
Updates UserDefinedFunction to nondeterministic.
Attributes