Complete the code to read a CSV file using pandas.
import pandas as pd data = pd.read_csv([1])
File names must be given as strings in quotes when reading files.
Complete the code to read a JSON file into a pandas DataFrame.
import pandas as pd data = pd.read_json([1])
The file name must be a string with quotes when reading JSON files.
Fix the error in the code to read a CSV file with a custom delimiter.
import pandas as pd data = pd.read_csv('data.csv', delimiter=[1])
The delimiter must be a string character, so it needs quotes.
Fill both blanks to create a dictionary comprehension that maps words to their lengths only if length is greater than 3.
words = ['data', 'is', 'fun', 'and', 'easy'] lengths = {word: [1] for word in words if [2]
We want the length of each word as the value, and only include words with length greater than 3.
Fill all three blanks to create a dictionary comprehension that maps uppercase words to their lengths only if length is greater than 3.
words = ['data', 'is', 'fun', 'and', 'easy'] lengths = {{ [1]: [2] for word in words if [3] }}
The keys are uppercase words, values are their lengths, filtered by length greater than 3.