1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to PySpark

Connected

Exercise

Bringing it all together II

Create a DataFrame, apply transformations, cache it, and check if it’s cached. Then, uncache it to release memory. For this exercise a spark session has been made for you! Look carefully at the outcome of the .explain() method to understand what the outcome is!

Instructions

100 XP
  • Cache the df DataFrame.
  • Explain the processing of the agg_result DataFrame.
  • Unpersist the cached df DataFrame after processing.