Complete the code to perform a merge of df1 and df2 on the 'id' column.
result = df1.[1](df2, on='id')
Use merge to join two DataFrames on a key column.
Complete the code to perform a left join using pandas merge with the correct 'how' parameter.
result = pd.merge(df1, df2, on='id', how='[1]')
The how='left' parameter keeps all rows from the left DataFrame.
Fix the error in the code to perform a right join on 'key' column.
result = pd.merge(df1, df2, on='[1]', how='right')
The join key column must be specified as a string in quotes.
Fill both blanks to create a dictionary comprehension that maps words to their lengths only if length is greater than 3.
{word: [1] for word in words if [2]The dictionary maps each word to its length, filtering words longer than 3 characters.
Fill all three blanks to create a dictionary comprehension that maps uppercase words to their lengths if length is greater than 4.
{ [1]: [2] for word in words if [3] }The dictionary maps uppercase words to their lengths, filtering words longer than 4 characters.