Filtering student information with Pandas 2


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 green or yellow and their grade is between 85-95 (inclusive).


Access restricted

Subscribe to premium account to see the solution.

Get premium now