Class 12 Thipmcq
Class 12 Thipmcq
2. Given a Pandas series called Sequences, the command which will display
the first 4 rows is .
a. print(Sequences.head(4)) (CORRECT)
b. print(Sequences.Head(4))
c. print(Sequences.heads(4)
d. print(Sequences.Heads(4))
a. line plot
b. bar graph
c. histogram (CORRECT)
d. none of the above
5. In a DataFrame, Axis= 1 represents the _______elements.
a. Row element
b. Column element (CORRECT)
c. None of the above
d. All the above
Write down the command that will give the following output.
a. print(df.max)
b. print(df.max()) (correct)
c. print(df.max(axis=1))
d. print(df.max, axis=1)
8. The teacher needs to know the marks scored by the student with roll
number 4. Help her to identify the correct set of statement/s from the
given options :
a. df1=df[df[‘rollno’]==4] (correct)
print(df1)
b. df1=df[rollno==4]
print(df1)
c. df1=df[df.rollno=4]
print(df1)
. d. df1=df[df.rollno==4]
print(df1) (correct)
9. Which of the following statement/s will give the exact number of values
in each column of the dataframe?
i. print(df.count())
ii. print(df.count(0))
iii. print(df.count)
iv. print(df.count(axis=’index’))
Choose the correct option: