teradataml provdies 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). You can 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