Recall & Review
beginner
What is a left join in data analysis?
A left join keeps all rows from the left table and adds matching rows from the right table. If no match is found, it fills with missing values (like NaN).
Click to reveal answer
beginner
What does a right join do?
A right join keeps all rows from the right table and adds matching rows from the left table. If no match is found, it fills with missing values.
Click to reveal answer
beginner
In pandas, which function and parameter do you use to perform a left join?
Use
pd.merge(left_df, right_df, how='left', on='key_column') to do a left join on the key column.Click to reveal answer
beginner
What happens to rows in the right table that do not match any row in the left table during a left join?
They are dropped because the left join keeps all rows from the left table only.
Click to reveal answer
intermediate
How is a right join different from an inner join?
A right join keeps all rows from the right table, even if no match exists in the left table. An inner join keeps only rows with matches in both tables.
Click to reveal answer
Which join keeps all rows from the left table and matches from the right?
✗ Incorrect
A left join keeps all rows from the left table and adds matching rows from the right.
In pandas, how do you specify a right join?
✗ Incorrect
Use how='right' in pd.merge() to perform a right join.
What happens to unmatched rows in the right table during a left join?
✗ Incorrect
Unmatched rows in the right table are dropped in a left join.
Which join keeps all rows from both tables, filling missing matches with NaN?
✗ Incorrect
An outer join keeps all rows from both tables.
If you want only rows with matching keys in both tables, which join do you use?
✗ Incorrect
Inner join returns only rows with matching keys in both tables.
Explain in your own words what a left join does and give a real-life example.
Think about keeping all your friends and adding info about their pets if available.
You got /4 concepts.
Describe the difference between a left join and a right join with a simple analogy.
Imagine two lists: one is your shopping list (left), the other is what’s in the fridge (right).
You got /4 concepts.