Complete the code to create a new feature by multiplying 'age' and 'income'.
df['age_income'] = df['age'] [1] df['income']
Multiplying 'age' and 'income' creates an interaction feature that combines both effects.
Complete the code to create an interaction feature by concatenating 'city' and 'job' as strings.
df['city_job'] = df['city'] [1] df['job']
Using '+' concatenates two string columns to create an interaction feature.
Fix the error in the code to create an interaction feature by multiplying 'height' and 'weight'.
df['height_weight'] = df['height'] [1] df['weight']
Multiplying 'height' and 'weight' creates an interaction feature that combines both effects.
Fill both blanks to create a dictionary of word lengths for words longer than 3 characters.
lengths = {word: [1] for word in words if len(word) [2] 3}The dictionary comprehension maps each word to its length if the word length is greater than 3.
Fill all three blanks to create a dictionary with uppercase keys and values greater than zero.
result = { [1]: [2] for k, v in data.items() if v [3] 0}This dictionary comprehension creates keys as uppercase strings and includes only items where the value is greater than zero.