Monday 20 September 2021

Class 12 - Informatics Practices - Data Handling Using Pandas-I (MCQs)(#class12Informatics)(#cbseTerm1)(#Class12IPMCQs)(#eduvictors)

Class 12 - Informatics Practices - Data Handling Using Pandas-I (MCQs)


Class 12 - Informatics Practices - Data Handling Using Pandas-I (MCQs)(#class12Informatics)(#cbseTerm1)(#Class12IPMCQs)(#eduvictors)


Q1: Which python library is commonly used in data analytics?

(a) Django

(b) Flask

(c) Pandas

(d) Java



Q2: Pandas key data structure is called?

(a) Keyframe

(b) Dataframe

(c) DataTable

(d) HashTable



Q3: Which is the standard data missing marker used in Pandas?

(a) NaN

(b) Null

(c) Nil

(d) Empty



Q4: Which of the following command is used to install pandas?

(a) install pandas

(b) pip install pandas

(c) pip pandas

(d) import pandas



Q5: If Pandas Series is analogous to a row in database, Pandas Dataframe is analogous to?

(a) Table

(b) Column

(c) Index

(d) None of these



Q6: Consider the following series object is created.

>>> import pandas as pd

>>> seriesNum = pd.Series([10,20,30,40,50])

Which command is used to display top three rows?

(a) print(seriesNum.Heads(3))

(b) print(seriesNum.HEADS(3))

(c) print(seriesNum.head(3))

(d) print(seriesNum.HEAD(3))



Q7: Which of the following correctly explains the following python statement:

>>> s1 = pd.Series({'001' : 'Sam', '002':'Mike', '003' : 'Sanya', '004' : 'Nancy'})

(a) Series object is created from a Python array

(b) Series object is created from a Python tuple

(c) Series object is created from a Numpy ndarray

(d) Series object is created from s Python dictionary



Q8: Pandas Series is:

(a) 2 Dimensional

(b) 3 Dimensional

(c) 1 Dimensional

(d) Multidimensional



Q9: What is the output of the following snippet?

>> import numpy as np

>> import pandas as pd

>>  s = pd.Series([1,3,5,np.nan,6,8])

>> print (s[3])


(a) 3

(b) 5

(c) nan

(d) 6



Q10: The name “Pandas” is derived from the term: 

(a) Panel Data

(b) Panel Series

(c) Python Document 

(d) Panel Data Frame



Q11: Which of the following import statement is not correct?

(a) import pandas as class12

(b) import pandas as 1pd

(c) import pandas as pd1

(d) import pandas as pdf



Q12: Consider the following snippet. 

>>> import pandas as pd

>>> seriesCapCntry = pd.Series(['NewDelhi', 'WashingtonDC', 'London', 'Paris'], index=['India', 'USA', 'UK', 'France'])

Write the command to slice seriesCapCntry to display 'Washington DC' and 'London'.

(a) seriesCapCntry.head()

(b) seriesCapCntry.slice(0)

(c) seriesCapCntry[0:2]

(d) seriesCapCntry[1:3]



Q13: Pandas data frame cannot be created using:

(a) Dictionary of tuples

(b) Series

(c) Dictionary of List 

(d) List of Dictionaries



Q14: Which of the following state is FALSE about DataFrames(DF)?

(a) DF object can have heterogenous data.

(b) DF object is 2-dimensional

(c) DF is value-mutable i.e. elment values can change.

(d) DF is size-immutable i.e. size once created cannot be altered.



Q15: In a dataframe axis-0 is for

(a) Columns

(b) Rows

(c) Rows and Columns

(d) Indexes



Answers:

1: (c) Pandas

2: (b) Dataframe

3: (a) NaN

4: (b) pip install pandas

5: (a) Table

6: (c) print(seriesNum.head(3))

7: (d) Series object is created from s Python dictionary

8: (c) 1 Dimensional

9: (c) nan

10: (a) Panel Data

11: (b) import pandas as 1pd

12: (d) seriesCapCntry[1:3]

13: (a) Dictionary of tuples

14: (d) DF is size-immutable i.e. size once created cannot be altered.

15: (b) Rows


No comments:

Post a Comment

We love to hear your thoughts about this post!

Note: only a member of this blog may post a comment.