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

Connected

Exercise

Aggregating in PySpark

Now you're ready to do some aggregating of your own! You're going to use a salary dataset that you have already used. Let's see what aggregations you can create! A SparkSession called spark is already in your workspace, along with the Spark DataFrame salaries_df.

Instructions

100 XP
  • Find the minimum salary at a US, Small company - performing the filtering by referencing the column directly ("salary_in_usd"), not passing a SQL string.
  • Find the maximum salary at a US, Large company, denoted by a "L" - performing the filtering by referencing the column directly ("salary_in_usd"), not passing a SQL string.