Spark 2 Workbook Answers ⏰
# 4️⃣ Action – trigger the computation and collect the count unique_word_count = distinct_words.count()
## 6. Quick Reference Cheatsheet (Spark 2.4) spark 2 workbook answers
val df = spark.read .option("header","true") .option("inferSchema","true") .csv("hdfs:///data/employees.csv") # 4️⃣ Action – trigger the computation and
sc = SparkContext(appName="WordCount") lines = sc.textFile("hdfs:///data/myfile.txt") spark 2 workbook answers