Complete the code to convert the 'name' column to lowercase.
df['name'] = df['name'].[1]()
Using lower() converts all characters in the string to lowercase.
Complete the code to check if the 'email' column contains '@' symbol.
df['email'].str.[1]('@')
The contains() method checks if the string has the given substring anywhere.
Fix the error in the code to replace spaces with underscores in the 'city' column.
df['city'] = df['city'].str.[1](' ', '_')
The replace() method replaces specified characters in strings.
Fill both blanks to create a dictionary of word lengths for words longer than 4 letters.
lengths = {word: [1] for word in words if [2]The dictionary comprehension maps each word to its length if the word length is greater than 4.
Fill all three blanks to filter a DataFrame for rows where 'name' starts with 'J' and create a list of uppercase names.
filtered = df[df['name'].str.[1]('J')] names = [n.[2]() for n in filtered['name'] if n.[3]()]
The code filters names starting with 'J', then creates a list of uppercase names that contain only letters.