Spark, Data Science, Tutorial, Machine Learning, Machine Intelligence.
data.filter(data("rn") > 2).toDF(); data = data.filter(data("value") !== "C").groupBy("value").count(); data.orderBy(data("count").desc).first().get(0); /*var occurance = data.orderBy(data("count").desc).toDF(); occurance.first().get();*/ } The above snippet is find the mode value form the data, so