Volunteers With All Three Certifications
Problem
You are given a DataFrame `certs` with columns `volunteer_id` and `cert`, listing each certification a disaster-relief volunteer holds (rows may repeat).
To lead a field team a volunteer must hold all three of **FirstAid**, **Logistics**, and **Radio**. Return the `volunteer_id` of every volunteer who holds all three (they may hold others too), ordered by `volunteer_id` ascending.
Input data
Example rows — the live problem includes the full dataset.
certs
| volunteer_id | cert |
|---|---|
| 301 | FirstAid |
| 301 | Logistics |
| 301 | Radio |
| 302 | FirstAid |
| 302 | Cooking |
Expected output
Your answer should return 2 rows with the columns volunteer_id.
Starter code (Pandas (Python))
import pandas as pd
def volunteers_with_all_three_certs(certs) -> pd.DataFrame:
# Your code here
return certsSolve this Pandas question free
Write Pandas (Python) and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock