snowflake.snowpark.functions.pandas_udf¶
- snowflake.snowpark.functions.pandas_udf(func: Callable | None = None, *, return_type: DataType | None = None, input_types: List[DataType] | None = None, name: str | Iterable[str] | None = None, is_permanent: bool = False, stage_location: str | None = None, imports: List[str | Tuple[str, str]] | None = None, packages: List[str | module] | None = None, replace: bool = False, if_not_exists: bool = False, session: Session | None = None, parallel: int = 4, max_batch_size: int | None = None, statement_params: Dict[str, str] | None = None, source_code_display: bool = True) UserDefinedFunction | partial[source]¶
Registers a Python function as a vectorized UDF and returns the UDF. The arguments, return value and usage of this function are exactly the same as
udf(), but this function can only be used for registering vectorized UDFs. See examples inUDFRegistration.See also
Example:
or as named Pandas UDFs that are accesible in the same session. Instead of calling pandas_udf as function, it can be also used as a decorator:
Example: