This section is included to assist the students to perform the activities present in the course. It includes detailed steps that are to be performed by the students to complete and achieve the objectives of the course.
Lesson 1: Introduction to Spark Distributed Processing
Activity 1: Statistical Operations on Books
- Open the file you've used for the exercise (book_analysis_act_b1.py in this case).
- Define a function by the name statistics, and import operator and statistics:
- Next, get the average word length. Use the function mentioned in the Prerequisites section of this activity. Print the word length.
avg = ...