AnalystPath

Grant Applicants Who Cleared Review

PandasMediumMid level~10 min

Problem

You are given two DataFrames. `applicants` has columns `applicant_id`, `panel_id`, and `tenure_years`; `applicant_id` uniquely identifies each applicant, `panel_id` is the review panel assigned to them, and `tenure_years` is how many years they have worked in the field. `reviews` has columns `panel_id` and `points`; a panel scores several criteria, so a `panel_id` may appear in multiple rows, each giving the points for one criterion.

Return the `applicant_id` of every applicant who has at least `3` years of tenure and whose combined review points across their panel sum to more than `20`. Return the result in any order, in one column `applicant_id`.

Input data

Example rows — the live problem includes the full dataset.

applicants
applicant_idpanel_idtenure_years
11005
22002
33004
reviews
panel_idpoints
10012
10015
20030
30010

Expected output

Your answer should return 1 row with the columns applicant_id.

Starter code (Pandas (Python))

import pandas as pd

def grant_applicants_who_cleared_review(applicants, reviews) -> pd.DataFrame:
    # Your code here
    return applicants

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