Complete the code to import the Pandas library with the common alias.
import [1] as pd
The Pandas library is imported using the name pandas and commonly aliased as pd.
Complete the code to create a NumPy array from a Python list.
import numpy as np arr = np.[1]([1, 2, 3, 4])
The array function in NumPy converts a list into a NumPy array.
Fix the error in the code to plot a simple line graph using Matplotlib.
import matplotlib.pyplot as plt plt.[1]([1, 2, 3], [4, 5, 6]) plt.show()
The plot function draws a line graph with x and y values.
Fill both blanks to create a Pandas DataFrame from a dictionary and show its first rows.
import pandas as pd data = {'name': ['Anna', 'Bob'], 'age': [25, 30]} df = pd.[1](data) print(df.[2]())
DataFrame creates a table from a dictionary. head() shows the first rows.
Fill all three blanks to create a NumPy array, calculate its mean, and print the result.
import numpy as np arr = np.[1]([10, 20, 30, 40]) mean_value = arr.[2]() print([3])
array creates the NumPy array, mean() calculates the average, and mean_value holds the result to print.