0
0
Data Analysis Pythondata~5 mins

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

Choose your learning style9 modes available
Recall & Review
beginner
What is an inner join in database terms?
An inner join combines rows from two tables where the join condition is true, returning only matching rows from both tables.
Click to reveal answer
beginner
In an inner join, what happens to rows that do not have matching values in both tables?
Rows without matching values in both tables are excluded from the result set.
Click to reveal answer
beginner
How do you perform an inner join using pandas in Python?
Use pandas.merge(left_df, right_df, on='key_column', how='inner') to join two dataframes on a key column.
Click to reveal answer
intermediate
Why is an inner join useful in data analysis?
It helps combine related data from different tables, showing only the rows where there is a match, which is useful for focused analysis.
Click to reveal answer
intermediate
What is the difference between an inner join and a left join?
An inner join returns only matching rows from both tables, while a left join returns all rows from the left table and matching rows from the right table (or NaN if no match).
Click to reveal answer
What does an inner join return?
AOnly rows with matching keys in both tables
BAll rows from the left table
CAll rows from the right table
DAll rows from both tables
Which pandas function is used to perform an inner join?
Apandas.concat()
Bpandas.append()
Cpandas.join() with how='outer'
Dpandas.merge() with how='inner'
If a row in the left table has no matching row in the right table, will it appear in an inner join result?
AYes, always
BNo, it will be excluded
COnly if specified with a condition
DOnly if the right table is empty
Which SQL keyword is used to specify an inner join?
AINNER JOIN
BOUTER JOIN
CLEFT JOIN
DJOIN
What is the main purpose of using an inner join?
ATo remove duplicates from a table
BTo combine all rows from two tables
CTo combine only matching rows from two tables
DTo sort data in a table
Explain what an inner join does and give a simple example of when you might use it.
Think about how you combine two lists but keep only the common items.
You got /3 concepts.
    Describe how to perform an inner join using pandas in Python and what parameters are important.
    Remember the function that combines dataframes based on a key.
    You got /3 concepts.