calculate median and inter quartile range on spark dataframe

NarwshKumar
New Contributor

I have a spark dataframe of 5 columns and I want to calculate median and interquartile range on all. I am not able to figure out how do I write udf and call them on columns.