Quarterly Test - I
Quarterly Test - I
Class – XII
Q.2 In Python Pandas, while performing mathematical operations on series, index matching is
implemented and all missing values are filled in with by default. [2]
Q.3 Assertion (A) To use the Pandas library in a Python program, one must import it. [2]
Reason (R) The only alias name that can be used with the Pandas library is pd.
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is False but R is True
Q.6 What is a correct syntax to return the values of first row of a Pandas DataFrame dfRent?
[2]
(a) dfRent[0] (b) dfRent.loc[1] (c) dfRent.loc[0] (d) dfRent.iloc[1]
Q.8 What is a DataFrame and how is it different from a 2-D array ? [3]
Q.9 What do you understand by the size of (i) a Series, (ii) a DataFrame ? [3]
Q.10 The Python code written below has syntactical errors. Rewrite the correct code and underline
the corrections made. [3]
import Pandas as pd
data = {'A': 1, 'B'; 2. 'C': 3}
my_series = Pd.Series(data)
print(my_series)
a.Consider the following records in ‘Salesman’ table and answer the given questions.
Salesman
b. Create the following DataFrame Sales containing year wise sales figures for five sales persons in INR
and answer the following: