BuildlyBuildly
DashboardExercisesProfileHelp
Data Science/Module 2: Data Analytics/Merge & Concat2/3
Exercise·7 min·10 XP

Inner Join Two Tables

Context. Combine an orders table with a customers table so each order row picks up the customer's name.

Your task. Write attach_customer_name(orders, customers) that returns an inner-joined DataFrame on customer_id. Only customers present in both tables are kept.

Example. orders has customer_ids 1, 2, 3; customers has 1, 2, 4 → result has only rows for IDs 1 and 2.

Notes. Inner join. Result preserves the orders-table row order for matched rows. No overlap → empty DataFrame.

Previous
Sort by Multiple Columns
Next
Left Join with Fallback Value