I am using Spark2, Zeppelin and Scala to show the top 10 occurrences of words in a data set. My code:
z.show(dfFlat.groupBy("value").count().sort(desc("count")), 10)
gives:
How do I ignore 'cat' and have the plot start from 'hat' i.e. show 2nd through last elements?
I tried:
z.show(dfFlat.groupBy("value").count().sort(desc("count")).slice(2,4), 10)
but this gives:
error: value slice is not a member of org.apache.spark.sql.Dataset[org.apache.spark.sql.Row]