from pyspark.sql.functions import col, collect_set, concat_ws, udf

def myFunc(data_list):
    for val in data_list:
        pass
Applying UDFs on GroupedData in PySpark (with functioning python example)