Challenge: Filter Out the Values Below Average

Learn how to find values below average in a column of a DataFrame.

We'll cover the following

Problem statement

Up to this point, we’ve covered:

  • How to find the number of unique values in a column.
  • How to find the average value of a column.
  • How to filter the values in a DataFrame.

The challenge is to find the number of products that are priced higher than the average product price in the sales data frame. As a hint, keep in mind that you need to use the operations specified with the bullet points above.

Solution

Write your solution in the specified place and click on “test”.

  • Make sure to uncomment the lines before execution.

Get hands-on with 1400+ tech skills courses.