Tutors Idle Through 2023
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_id | student_name |
|---|---|
| 101 | Hana |
| 102 | Omar |
| 103 | Tess |
| session_id | held_on | fee | student_id | tutor_id |
|---|---|---|---|---|
| 1 | 2023-03-01 | 150 | 101 | 1 |
| 2 | 2023-05-25 | 240 | 102 | 2 |
| 3 | 2022-05-25 | 80 | 101 | 3 |
| 4 | 2023-09-13 | 100 | 103 | 2 |
| 5 | 2022-02-11 | 70 | 101 | 2 |
| tutor_id | tutor_name |
|---|---|
| 1 | Devon |
| 2 | Esme |
| 3 | Faris |
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 studentSolve 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