Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CLASS_XII_SERIES_MCQ

Total questions: 20

Worksheet time: 15mins

Name
Class
Date
1.

To create an empty Series object, you can use:

a)

pd.Series(empty)

b)

pd.Series( )

c)

pd.Series(np.NaN)

d)

all of these

2.

To get the number of elements in a Series object, attribute may be used

a)

index

b)

size

c)

itemsize

d)

ndim

3.

To specify datatype int16 for a Series object, you can write :

a)

pd.Series(data = array, dtype = int16)

b)

pd.Series(data = array, dtype = numpy.int16)

c)

pd.Series(data = array.dtype pandas.int16)

d)

pd.Series(data = array.dtype pandas.int16)

4.

. To get the number of dimensions of a Series object,

a)

index

b)

size attribute is displayed.

c)

itemsize

d)

ndim

5.

To get the size of the datatype of the items in Series object, you can display attribute.

a)

index

b)

size

c)

itemsize

d)

ndim

6.

To get the number of elements in a Series object, attribute may be used.

a)

index

b)

size

c)

itemsize

d)

ndim

7.

To display third element of a Series object S, you will write

a)

S[:3]

b)

S[02]

c)

S[2]

d)

S[:2]

8.

To display first three elements of a Series object S, you may write

a)

S[:3]

b)

S[3]

c)

S[3rd]

d)

all of these

9.

To display last five rows of a Series object S, you may write

a)

head()

b)

head()

c)

tail(15 )

d)

tail(5)

10.

Pandas object cannot grow in size.

a)

Dataframe

b)

Panel

c)

Series

d)

None of these

11.

The axis 0 identifies a dataframe's

a)

rows

b)

rows

c)

values

d)

datatype

12.

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]

13.

Identify the correct statement:

a)

Data frames can change their size.

b)

Series act in a way similar to that of an array.

c)

Both (a) and (b)

d)

None of the above

14.

To delete a column from a DataFrame, you may use statement.

a)

remove

b)

Crop

c)

drop

d)

cancel statement.

15.

Which of the following statement will import Pandas library ?

a)

import pandas as pd

b)

import pandas as py

c)

import panda as py

d)

All of these

16.

What will be the output for the following code ?

>>> import pandas as pd

>>> S = pd. Series([1,2,3,4,5],index = ['a', 'b', 'c', 'd', 'e'])

>>> print ( s[ 'a'] )

a)

2

b)

1

c)

3

d)

4

17.

What is the purpose of using ndim attribute ?

a)

It returns the number of elements in the given data structure.

b)

It returns the Series object in the form of an ndarray.

c)

It returns a list of the indexes / labels.

d)

It returns the number of dimensions of the given data structure.

18.

Which of the following are modules/libraries in Python?

a)

NumPy

b)

Pandas

c)

Matplotlib

d)

All of the above

19.

NumPy stands for ____

a)

Number Python

b)

Numerical Python

c)

Numbers in Python

d)

None of the above

20.

PANDAS stands for _____________

a)

Panel Data Analysis

b)

Panel Data analyst

c)

Panel Data

d)

Panel Dashboard