MCQ Question For Class 12 Informatics Practices Chapter 2 Data Handling using Pandas – I

MCQs Class 12

Check the below NCERT MCQ Class 12 Informatics Practices Chapter 2 Data Handling using Pandas – I with Answers available with PDF free download. MCQ Questions for Class 12 Informatics Practices with Answers were prepared based on the latest syllabus and examination pattern issued by CBSE, NCERT and KVS. Our teachers have provided below Data Handling using Pandas – I Class 12 Informatics Practices MCQs Questions with answers which will help students to revise and get more marks in exams

Data Handling using Pandas – I Class 12 Informatics Practices MCQs Questions with Answers

Refer below for MCQ Class 12 Informatics Practices Chapter 2 Data Handling using Pandas – I with solutions. Solve questions and compare with the answers provided below

Question. _________ is used when data is in Tabular Format
(a) NumPy
(b) Pandas
(c) Matplotlib
(d) All of the above

Answer

B

Question. While performing mathematical operations on series, index matching is implemented and all missing values are filled in with ___________ by default
(a) NaN
(b) None
(c) 0
(d) 1

Answer

A

Question. open( ) function returns a file object called ______________
(a) object handle
(b) file handle
(c) read handle
(d) write handle

Answer

B

Question. We can access elements in Series by using ________ index and ____________index.
(a)Numeric, labelled
(b) Positional, Naming
(c) Positional, labelled
(d) None of the above

Answer

C

Question. Which of the statements is used to import all names from a module into the current calling module?
(a) import
(b) from
(c) import *
(d) dir()

Answer

C

Question. What is full form of CSV
(a) Comma Separation Value
(b) Comma Separated Value
(c) Common Syntax Value
(d) Comma Separated Variable

Answer

B

Question. Identify the invalid mode from the following.
(a) a
(b) r+
(c) ar+
(d) w

Answer

C

Question. For a dataframe df[:] = 0 will
(a) Create result set with elements having data equal to 0
(b) Assign 0 to all its elements
(c) Display value of first row and column
(d) Assign value of first row and column

Answer

A

Question. _______ function returns the current position of file pointer.
(a) get( )
(b) tell( )
(c) cur( )
(d) seek( )

Answer

B

Question. Pandas is the ____ library.
(a) Freeware
(b) Proprietary
(c) Open source
(d) End source

Answer

C

Question. A .py file containing constants/variables, classes, functions etc. related to a particular task and can be used in other programs is called
(a) module
(b) library
(c) classes
(d) documentation

Answer

A

Question. Two common ways for accessing the elements of a series are _________ and _______
(a) Indexing, Concatenation
(b) Labelled Indexing, Positional Indexing
(c) Indexing, Slicing
(d) Slicing, Cutting

Answer

C

Question. Which of the following statement is wrong?
(a) We can create Series from Dictionary in Python.
(b) Keys of dictionary become index of the series.
(c) Order of indexes created from Keys may not be in the same order as typed in dictionary.
(d) All are correct

Answer

D

Question. Which of the following is not true about dataframe?
(a) A dataframe object can be created by passing dictionaries.
(b) A dataframe is size immutable.
(c) A dataframe index can be string.
(d) A column of dataframe can have data of different types.

Answer

B

Question. To access value of data using column labels we can use:
(a) loc
(b) <dataframe object>.<column label>
(c) <dataframe object>[column lable]
(d) b and c

Answer

D

Question. Which function would you use to set the limits for x-axis of the plot?
(a) limits( )
(b) xlimits( )
(c) xlim()
(d) lim( ) 

Answer

C

Question. When you print/display any series then the left most column is showing _________ value.
(a) Index
(b) Data
(c) Value
(d) None of the above 

Answer

A

Question. Which method is used to access vertical subset of a dataframe?
(a) iterrows()
(b) iteritems()
(c) mod()
(d) median() 

Answer

B

Question. The properties are also known as
(a) methods
(b) functions
(c) indexes
(d) attributes 

Answer

D

Question. To delete a row from dataframe, you may use _______ statement.
(a) remove()
(b) del()
(c) drop()
(d) cancel() 

Answer

B

Question. The correct statement to read from a CSV file in a dataframeis :
(a) <DF>.read_csv(<file>)
(b) <File>. read_csv( )(<DF>)
(c) <DF> = pandas.read(<file>)
(d) <DF> = pandas.read_csv(<files>) 

Answer

D

Question.. To display the 3rd, 4th and 5th columns from the 6th to 9th rows of a dataframe you can write
(a) DF.loc[6:9, 3:5]
(b) DF.loc[6:10, 3:6]
(c) DF.iloc[6:10, 3:6]
(d) DF.iloc[6:9, 3:5] 

Answer

C

Question. Which of the following is correct Features of DataFrame?
(a) Potentially columns are of different types
(b) Can Perform Arithmetic operations on rows and columns
(c) Labeled axes (rows and columns)
(d) All of the above 

Answer

D

Question. To create an empty series object you can use:
(a) pd.Series(empty)
(b) pd.Series(np.NaN)
(c) pd.series()
(d) All of these 

Answer

C

Question. A two-dimensional labelled data structure that is an ordered collection of columns to store heterogeneous data is called
(a) Series
(b) Nmpy array
(c) Dataframe
(d) Panel

Answer

C

Question. To check whether a series is empty or not, the attribute used is
(a) empty
(b) blank
(c) isnull
(d) isblank

Answer

A

Question. To delete a dataframe column using drop() method , the minimum number of parameters required is
(a) 1
(b) 2
(c) 3
(d) 4

Answer

B

Question. The pop() method can be used for :
(a) Series
(b) Dataframe
(c) Both
(d) None of these

Answer

C

Question. The axis parameter of the drop method while using it for dropping a column of a dataframe is :
(a) Compulsory
(b) Optional
(c) Compulsory only for deleting 1st column
(d) Compulsory only for deleting last column.

Answer

A

Question.  A series S1 is created as :
import pandas as p
s1=p.Series([1,2,3,4])
print(s1.hasnans)
will show :
(a) True
(b) False
(c) 1
(d) None

Answer

B

Question. Piya wanted to change the value of index 3 of a series s1 to 100, the statement will be :
(a) s1.3=100
(b) s1(3)=100
(c) s1[3]=100
(d) None

Answer

C

Question. Rajan wanted to see all the values of a series school , which command(s) will do it :
(a) school[0:]
(b) school[:]
(c) school.all
(d) Both (a) and (b)

Answer

D

Question. The statement to create a series :
s1=pd.Series([1,2,3,4],index=[-4,-3,-2,-1]) is :
(a) Is perfectly correct.
(b) Negative indexes cannot be given for integer values.
(c) Negative indexes can be given only for String values.
(d) Negative indexes can be specified by a tuple only.

Answer

A

Question. A series “Subject” comprises of following data :
Index    Values
0          Mathematics
1          Physics
2          Chemistry
3          ComputerScience
The code will have output
for s in Subject:
if len(s)>9:
print(s*2)
(a) MathematicsMathematics
(b) Mathematics Mathematics
     ComputerScienceComputerScience
(c) ComputerScienceComputerScience
(d) ComputerScienceComputerScience
     ComputerScienceComputerScience

Answer

B

Question. A dataframe “dfrange” is created by the following line :
dfrange=pd.DataFrame({‘Roll’:range(1,10,2),‘Marks’:range(1,10,2)})
The statement : print(df.size) will return :
(a) 8
(b) 9
(c) 10
(d) 11

Answer

C

Question. A series “Pseries” is created with the values [1.6,numpy.NaN,8.9,10.5](Assuming numpy module is already imported) . The output of the statement : Pseries.hasnans
will display :
(a) True
(b) False
(c) NaN
(d) NULL

Answer

A

Question. A dataframe “frm” exists . The statement frm+2 will:
(a) Update the dataframe permanently
(b) Will add 2 to each value of the first column and display only
(c) Will add 2 to each value of the dataframe and display , but no updation in the dataframe.
(d) None of the above

Answer

C

Question. Assuming the given series, named Faculty, which command will be used to print 4 as output?
Kiran Shah 26
Abhinav Sharma 28
Karan Arora 27
Nishant Kumar 35
Name : Teacher, dtype: int 64
(a) Faculty.index
(b) Faculty.size
(c) Faculty.length
(d) Faculty.values

Answer

B

Question. Read the statements given below and identify the right option about Boolean indexing.
Statement A In boolean indexing, boolean vectors can be used to reshape the data.
Statement B DataFrame using Boolean indexes as True and False.
(a) Statement A is correct.
(b) Statement B is correct.
(c) Statement A is correct but statement B is incorrect.
(d) Statement A is incorrect but statement B is correct.

Answer

D

Question. To skip 1st, 3rd and 5th rows of CSV file, which argument will you give in read_csv( ) ?
(a) skiprows = 11315
(b) skiprows – (1, 3, 5]
(c) skiprows = [1, 5, 1]
(d) Any of these 

Answer

B

MCQ Question For Class 12 Informatics Practices Chapter 2 Data Handling using Pandas – I