AnalystPath

Volunteers With All Three Certifications

PandasEasyJunior level~10 min

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_idcert
301FirstAid
301Logistics
301Radio
302FirstAid
302Cooking

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 certs

Solve 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

Related Pandas questions