Complete the code to select the 'age' column from the DataFrame.
selected = df[[1]]To select a single column by name, use the column name as a string inside square brackets.
Complete the code to select multiple columns 'name' and 'score' from the DataFrame.
selected = df[[1]]To select multiple columns, pass a list of column names inside square brackets.
Fix the error in the code to select the 'height' column from the DataFrame.
selected = df.[1]When using dot notation to select a column, use the column name without quotes or brackets.
Fill both blanks to create a dictionary with word lengths for words longer than 3 letters.
lengths = { [1] : [2] for word in words if len(word) > 3 }The dictionary comprehension uses the word as key and its length as value.
Fill all three blanks to create a dictionary with uppercase keys and values for words longer than 4 letters.
result = { [1] : [2] for word in words if len(word) [3] 4 }The keys are uppercase words, values are original words, and the condition filters words longer than 4 letters.