AnalystPath

Edition Catalogue Report

PandasEasyJunior level~10 min

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
edition_idbook_idrelease_yearcopieslist_price
110020081045
210020091245
720020111580
book
book_idtitle
100Tidewater
200Northwind
300Saltmarsh

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 edition

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