udf function decorator | teradataml DataFrame | Teradata Package for Python - udf - Function decorator - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

teradataml provides a decorator udf to mark/register a Python function as a UDF to run on each row in a teradataml DataFrame. The decorated function accepts the arguments, including the column name, and returns the ColumnExpression (DataFrame Column).

Use the decorated function with DataFrame.assign() like any other function.

Input of Python function

The user defined Python function can accept as many arguments as required or no argument. It also accepts column names corresponding to the DataFrame. Thus, the user function has access to the data to process in a familiar format .

Output of Python function

The user defined Python function returns a single value for each row in the DataFrame. This value corresponds to the output of the function applied to each row’s input