Complete the code to convert the 'name' column to lowercase using pandas str accessor.
df['name_lower'] = df['name'].str.[1]()
The str.lower() method converts all characters in the string to lowercase.
Complete the code to check if the 'email' column contains '@' using pandas str accessor.
df['has_at'] = df['email'].str.[1]('@')
The str.contains() method checks if the string contains the specified substring.
Fix the error in the code to remove whitespace from the 'city' column using pandas str accessor.
df['city_clean'] = df['city'].str.[1]()
The str.strip() method removes whitespace from both ends of the string.
Fill both blanks to create a dictionary with words as keys and their lengths as values, only for words longer than 4 characters.
lengths = {word: [1] for word in words if len(word) [2] 4}The dictionary comprehension uses len(word) as value and filters words with length greater than 4 using >.
Fill all three blanks to create a dictionary with uppercase keys, values from data, only if value is positive.
result = [1]: [2] for k, v in data.items() if v [3] 0}
The dictionary comprehension uses uppercase keys with k.upper(), values as v, and filters for positive values with >.