The Pandas UDFs work with Pandas APIs inside the function and Apache Arrow for exchanging data. It allows vectorized operations that can increase performance up to 100x, compared to row-at-a-time Python UDFs.
The example below shows a Pandas UDF to simply add one to each value, in which it is defined with the function called
pandas_udfwith the Pandas UDF type specified as
Click through for explanations and demos for each.