Class 12 Hot Questions
Class 12 Hot Questions
Class 12 Hot Questions
Class XII
INFORMATICS PRACTICES (065)
HOT QUESTIONS with ANSWERS
Q.1 How is series data structure different from a dataframe data structure?
Ans: A series is one-dimensional object that can hold any data type such as integers, floats and
strings. It has only 1 axis (axis=0).
A dataframe is a two-dimensional object that can have columns with potential different types.
It has two axes (axis 0 and axis1).
Q.2 What is the basic difference between iterrows() and iteritems() functions?
Ans: <DF>.iteritems() iterates over vertical subsets in the form of (col-index, Series) pairs, and
<DF>.iterrows() iterates over horizontal subsets in the form of (row-index, Series) pairs.
Q.3 Write equivalent function for the following operations on two DataFrames A and B
(i) A+B (ii) A-B (iii) B-A (iv) B*A (v) A/B (vi) B/A
Ans: (i) A.add(B) (ii) A.sub(B)
(iii) B.sub(A) or A.rsub(B) (iv) B.mul(A) or A.rmul(B)
(v) A.div(B) (vi) B.div(A) or A.rdiv(B)
Q.13 What is the difference between a WHERE clause and a HAVING clause of SQL SELECT
statement?
Ans: The difference between WHERE and HAVING clause is that WHERE conditions are
applicable on individual rows whereas HAVING conditions are applicable on groups as
formed by GROUP BY clause.
____________________