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] ¶ -
Python中的用户定义函数
新增于版本 1.3。
注释
此类构造函数不应直接调用。 使用
pyspark.sql.functions.udf()
或pyspark.sql.functions.pandas_udf()
来创建此实例。方法
将用户定义函数更新为非确定性。
属性