AnalystPath

Tutors Idle Through 2023

PandasEasyJunior level~10 min

Problem

An online tutoring marketplace keeps three DataFrames: `student` (`student_id`, `student_name`), `session` (`session_id`, `held_on`, `fee`, `student_id`, `tutor_id`), and `tutor` (`tutor_id`, `tutor_name`). `held_on` is an ISO date string.\n\nReturn the names of every tutor who taught **no session at all during 2023** (no row in `session` whose `held_on` falls in that year). Output one column, `tutor_name`, ordered alphabetically.

Input data

Example rows — the live problem includes the full dataset.

student
student_idstudent_name
101Hana
102Omar
103Tess
session
session_idheld_onfeestudent_idtutor_id
12023-03-011501011
22023-05-252401022
32022-05-25801013
42023-09-131001032
52022-02-11701012
tutor
tutor_idtutor_name
1Devon
2Esme
3Faris

Expected output

Your answer should return 1 row with the columns tutor_name.

Starter code (Pandas (Python))

import pandas as pd

def tutors_idle_2023(student, session, tutor) -> pd.DataFrame:
    # Your code here
    return student

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