I want to use data.groupby.apply() to apply a function to each row of my Pyspark Dataframe per group.
I used The Grouped Map Pandas UDFs. However I can't figure out how to add another argument to my function. DGCustomerFirst Survey
I tried using the argument as a global variable but the function doesn't recongnize it ( my argument is a pyspark dataframe)