pyspark using groupby and a function together

I need to use groupBy together with a function for finding a slope in a command but I keep getting error. the slope is going to be found using regression. the slope needs to be found for the data grouped by 3 different columns.

the function I am going to use could be similar to the one in this link: Pyspark : how do I apply the function to get slope in a dataframe?

Thanks for your help

Read more here:

Content Attribution

This content was originally published by mnm at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: