Complete the code to load a CSV file into a pandas DataFrame.
import pandas as pd df = pd.read_csv([1])
To load data from a CSV file, you need to provide the file name as a string to pd.read_csv().
Complete the code to display the first 5 rows of the DataFrame.
print(df.[1]())
tail() which shows the last rowsshow() which is not a pandas methodThe head() method shows the first 5 rows of a DataFrame by default.
Fix the error in the code to get summary statistics of the DataFrame.
summary = df.[1]()info() which shows data types but not statisticssummary()The describe() method returns summary statistics like mean, min, max, and quartiles.
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}word instead of len(word) for the value< instead of > in the conditionThe dictionary comprehension maps each word to its length if the word length is greater than 3.
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 }k.lower() instead of k.upper()< instead of > in the conditionThis dictionary comprehension creates a new dictionary with keys in uppercase and includes only items where the value is greater than zero.