How to select rows in a Pandas Dataframe based on a condition?

There are two different ways in which we can select rows based on a condition in a Pandas data frame.

1. Basic Method

Example
Find all employees with income greater than 20000:

2. Using .loc[]

Example
Find all employees with income greater than 20000: