0
0
Data Analysis Pythondata~5 mins

Outer join in Data Analysis Python - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is an outer join in database terms?
An outer join returns all rows from one or both tables, including rows that do not have matching values in the other table. Missing matches show as NULL.
Click to reveal answer
beginner
What is the difference between left outer join and right outer join?
Left outer join returns all rows from the left table and matched rows from the right. Right outer join returns all rows from the right table and matched rows from the left.
Click to reveal answer
beginner
In Python's pandas, which function is used to perform an outer join?
The pandas function merge() with the argument how='outer' performs an outer join.
Click to reveal answer
intermediate
What does a full outer join return?
A full outer join returns all rows from both tables. Rows without matches in the other table have NULLs in the missing columns.
Click to reveal answer
beginner
Why might you use an outer join instead of an inner join?
Use an outer join when you want to keep all data from one or both tables, even if there are no matching rows, to avoid losing information.
Click to reveal answer
Which join returns all rows from the left table and matched rows from the right table?
ALeft outer join
BRight outer join
CInner join
DCross join
In pandas, how do you specify an outer join using the merge function?
Ahow='outer'
Bhow='left'
Chow='inner'
Dhow='right'
What does a full outer join include that an inner join does not?
AOnly rows from the left table
BOnly matching rows
CAll rows from both tables, including unmatched
DOnly rows from the right table
If you want to keep all rows from the right table regardless of matches, which join do you use?
ALeft outer join
BRight outer join
CInner join
DFull outer join
What value appears in columns from the other table when there is no match in an outer join?
A0
BEmpty string
CFalse
DNULL
Explain what an outer join does and give an example of when you might use it.
Think about keeping all data from one or both tables even if no match exists.
You got /3 concepts.
    Describe the difference between left outer join, right outer join, and full outer join.
    Focus on which table's rows are fully kept in each join type.
    You got /4 concepts.