Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
6. Calculating medians
Grouping
Summary

Instruction

Good! As you saw, the median allows us to find where our data splits exactly in half. Once you find the median, you can find the medians of the lower half and the upper half of your dataset. This will give you a better idea of how the values in your dataset are distributed. Let's try this in an exercise.

Exercise

The median of the rating column of the movies DataFrame is already in the template. Calculate the median of the rating column that are below the median of this column.

Stuck? Here's a hint!

First you have to filter the rating column and select movies with a rating lower than the median of all movies. Use the following condition:

movies['rating'] < movies_median

Then you'll have to select the rating column from the filtered set, and then calculate the median.