Printing Top Rated Movies by Viewer Age

Learn how to apply a filter on the data read.

How to apply a filter on data?

Let’s compare how the tastes of different age brackets (13–19 vs. 60+) vary. If we want to see all the movies rated by people 60 and older, we’ll execute the code in line 21.

We’ll pass movie_data.age > 60 to itself, and pandas will return a DataFrame that meets this condition:

Get hands-on with 1200+ tech skills courses.