Keep matching rows
Comparing a column with a value creates a Boolean Series: one True or False for each row. Pass that condition to .loc[condition, columns] to keep matching rows and the requested columns.
| index | name | score |
|---|---|---|
| 0 | Ari | 10 |
| 1 | Bo | 20 |
| 2 | Cam | 30 |
| index | name | score |
|---|---|---|
| 2 | Cam | 30 |