3. Filtering a Pandas DataFrame. In Pandas, you can filter a DataFrame to select rows that meet specific conditions. You can use boolean indexing to create filters and select rows based on criteria.
For example, you can filter students who are older than 20 like this: df[df['Age'] > 20]
.