Combine the two sets of criteria using the pandas or operator. This yields a boolean Series of all movies that are members of either set:
>>> final_crit_all = final_crit_a | final_crit_b >>> final_crit_all.head() movie_title Avatar False
Pirates of the Caribbean: At World's End False
Spectre False
The Dark Knight Rises True
Star Wars: Episode VII - The Force Awakens False
dtype: bool
Once you have your boolean Series, you simply pass it to the indexing operator to filter the data:
>>> movie[final_crit_all].head()
We have successfully filtered the data and all the columns of the DataFrame. We can't easily perform a manual check to determine whether the filter worked correctly. Let's filter both rows and columns with the .loc indexer: