Complete the code to remove whitespace from the start and end of the 'Name' column in the DataFrame.
df['Name'] = df['Name'].str.[1]()
The str.strip() method removes whitespace from both the start and end of each string in the Series.
Complete the code to remove whitespace only from the right side of the 'City' column.
df['City'] = df['City'].str.[1]()
The str.rstrip() method removes whitespace only from the right side (end) of each string.
Fix the error in the code to remove whitespace from the left side of the 'Country' column.
df['Country'] = df['Country'].str.[1]()
The str.lstrip() method removes whitespace only from the left side (start) of each string.
Fill both blanks to create a dictionary of word lengths for words longer than 4 characters.
lengths = {word: [1] for word in words if len(word) [2] 4}The dictionary comprehension maps each word to its length if the word length is greater than 4.
Fill all three blanks to create a dictionary with uppercase keys and values greater than 0.
result = { [1]: [2] for k, v in data.items() if v [3] 0 }The dictionary comprehension uses uppercase keys, keeps values, and filters values greater than zero.