Filtering student information with Pandas


Suppose you have a dataframe, df, with the following records:

Age Favorite Color Grade Name
20 blue 88 Willard Morris
19 blue 95 Al Jennings
22 yellow 92 Omar Mullins
21 green 70 Spencer McDaniel

The dataframe is showing information about students. Write code using Python Pandas to select the rows where the students' favorite color is blue or yellow and their grade is above 90.


Access restricted

Subscribe to premium account to see the solution.

Get premium now