Skip to content

functions.py

functions.py module belongs to pyspark.sql package.

from pyspark.sql.functions import udf

udf

udf(
    f: Optional[Union[Callable[..., Any], "DataTypeOrString"]] = None,
    returnType: "DataTypeOrString" = StringType(),
) -> Union["UserDefinedFunctionLike", Callable[[Callable[..., Any]], "UserDefinedFunctionLike"]]

udf _create_py_udf with SQL_BATCHED_UDF eval type.