Complete the code to import the popular data analysis library in Python.
import [1] as pd
The pandas library is widely used for data analysis in Python because it provides easy-to-use data structures and data manipulation tools.
Complete the code to read a CSV file into a pandas DataFrame.
df = pd.[1]('data.csv')
The read_csv function loads data from a CSV file into a DataFrame for analysis.
Fix the error in the code to display the first 5 rows of the DataFrame.
print(df.[1]())
The head() method shows the first 5 rows of a DataFrame, which is useful to quickly check the data.
Fill both blanks to create a dictionary comprehension that maps words to their lengths only if the length is greater than 3.
{word: [1] for word in words if [2]The dictionary comprehension maps each word to its length using len(word). The condition len(word) > 3 filters words longer than 3 characters.
Fill all three blanks to create a dictionary comprehension that maps uppercase words to their counts only if count is greater than 1.
{ [1]: [2] for [3], [2] in data.items() if [2] > 1 }The comprehension maps each word converted to uppercase (word.upper()) to its count. It iterates over word, count pairs from data.items() and filters counts greater than 1.