Readers Who Never Checked Out a Book
Problem
**DataFrame: `reader`**
| Column | Type |
|-----------|---------|
| reader_id | int |
| name | varchar |
`reader_id` is unique — one row per library member.
**DataFrame: `checkout`**
| Column | Type |
|-------------|------|
| checkout_id | int |
| reader_id | int |
`checkout_id` is unique — each row records that a reader checked out a book.
Return a DataFrame with one column `Reader` holding the name of every reader who has **never** checked out a book. Any order.
Input data
Example rows — the live problem includes the full dataset.
| reader_id | name |
|---|---|
| 1 | Tamar |
| 2 | Noa |
| 3 | Eli |
| 4 | Yael |
| checkout_id | reader_id |
|---|---|
| 1 | 3 |
| 2 | 1 |
Expected output
Your answer should return 2 rows with the columns Reader.
Starter code (Pandas (Python))
import pandas as pd
def readers_without_checkout(reader, checkout) -> pd.DataFrame:
# Your code here
return readerSolve 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