AnalystPath

Readers Who Never Checked Out a Book

PandasEasyJunior level~10 min

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
reader_idname
1Tamar
2Noa
3Eli
4Yael
checkout
checkout_idreader_id
13
21

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 reader

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