Edition Catalogue Report
Problem
You are given two DataFrames. `edition` has columns `edition_id`, `book_id`, `release_year`, `copies`, and `list_price`. `book` has columns `book_id` and `title`.
For every row in `edition`, report the book's `title` together with that edition's `release_year` and `list_price`. Output exactly the three columns `title`, `release_year`, and `list_price`. Books that have no editions do not appear.
Input data
Example rows — the live problem includes the full dataset.
| edition_id | book_id | release_year | copies | list_price |
|---|---|---|---|---|
| 1 | 100 | 2008 | 10 | 45 |
| 2 | 100 | 2009 | 12 | 45 |
| 7 | 200 | 2011 | 15 | 80 |
| book_id | title |
|---|---|
| 100 | Tidewater |
| 200 | Northwind |
| 300 | Saltmarsh |
Expected output
Your answer should return 3 rows with the columns title, release_year, list_price.
Starter code (Pandas (Python))
import pandas as pd
def edition_catalogue_report(edition, book) -> pd.DataFrame:
# Your code here
return editionSolve 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