Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- readme = sc.textFile("README.md")
- wordCounts = readme.flatMap(lambda line: line.split()).map(lambda word: (word,
- 1)).reduceByKey(lambda a, b: a+b)
- wordCounts.collect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement