title: UDF to calculate Frequency (Rank of values) in Spark
body: <p>I want to calculate frequency of a column value in a dataframe Spark I.e calculate Ranks of a highest occurring values.How do we define dataframe UDF for this in Spark ?</p>