19. [Activity] Sorting the Word Count Results
SORTING OUR WORD COUNT RESULTS
Sorting The Results: Step 1
val wordCounts = lowercaseWords.map(x => (x, 1)).reduceByKey((x, y) => x + y)
Sorting The Results: Step 2
val wordCountsSorted = wordCounts.map(x = > (x._2, x._1)).sortByKey()
Off To The Code
Activity
Previous18. [Activity] Improving the Word Count Script with Regular ExpressionsNext20. [Exercise] Find the Total Amount Spent by Customer
Last updated