Complete the code to load a CSV file into a DataFrame using pandas.
import pandas as pd df = pd.[1]('data.csv')
The read_csv function loads CSV files into a pandas DataFrame.
Complete the code to display the first 5 rows of the DataFrame.
print(df.[1]())
The head() method shows the first 5 rows by default.
Fix the error in the code to get summary statistics of the DataFrame.
summary = df.[1]()The describe() method returns summary statistics like mean and std.
Fill both blanks to create a dictionary of word lengths for words longer than 3 characters.
lengths = {word: [1] for word in words if len(word) [2] 3}We use len(word) to get length and filter words with length greater than 3 using >.
Fill all three blanks to create a filtered dictionary with uppercase keys and values greater than 0.
result = {{ [1]: [2] for k, v in data.items() if v [3] 0 }}Keys are converted to uppercase with k.upper(), values are v, and filtered where v > 0.
