wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

python-series

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which is true for series.

a)

Size is mutable,Values is mutable

b)

size is immutable,values is mutable

c)

size is mutable,values is immutable.

d)

none

2.

Series.tail(3) will return how many values.

a)

3 values from front

b)

3 values from last

c)

5 values

d)

none

3.

To extract subset from Series,the following function is used

a)

row()

b)

column()

c)

loc()

d)

all

4.

we can analyze the data in pandas with :

a)

Series

b)

Dataframe

c)

Both

d)

none

5.

Minimum number of argument we require to pass in pandas series ?

a)

0

b)

1

c)

2

d)

3

6.

Minimum number of argument we require to pass in pandas series ?

a)

0

b)

1

c)

2

d)

3

7.

Which is not a feature of series

a)

Homogeneous data

b)

Immutable size

c)

Mutable data

d)

Multiple rows

8.

Full form of NaN is

a)

Not a Null

b)

Not a Number

c)

Not a Numeric

d)

None of these

9.

Full form of NaN is

a)

Not a Null

b)

Not a Number

c)

Not a Numeric

d)

None of these

10.

Data structures in Pandas can be mutated in the terms of ____ but not of _____.

a)

size, value

b)

value, size

c)

semantic, size

d)

none of the above

11.

Write the output for the following:

import pandas as pd1

s = pd1.Series(5, index=[0, 1, 2, 3])

print(s)

a)

0 5

b)

0 5

1 5

2 5

3 5

dtype: int64

c)

1 5

2 5

2 5

4 5

dtype: int64

d)

0 5

1 5

2 5

3 5

dtype: object

12.

____iterates over the DataFrame columns, returning a tuple with the column name and the content as a Series.


____returns a tuple with row index and row data as a Series object.

a)

df.items(), df.iterrows()

b)

df.iterrows(), df.items()

13.

Pandas is_________.

a)

a Python library that is built on NumPy and provides easy-to-use data structures and data analysis tools for the Python programming language.

b)

a Python 2D plotting library which produces publication-quality figures in a variety of hardcopy formats and interactive environments across platforms.

c)

a Python library that implements a range of machine learning,

preprocessing, cross-validation and visualization algorithms using a unified interface.

14.

Best way to import the pandas module in your program ?

a)

1.import pandas

b)

2.import pandas as pd

c)

3.from pandas import *

d)

4.All of the above

15.

Which of the following object you get after reading CSV file?

a)

a) DataFrame

b)

b) Character Vector

c)

c) Panel

d)

d) All of the mentioned

16.

Series can be created from

a)

Array

b)

Dictionary

c)

Scaler value

d)

All of them

17.

Pandas is the most popular library in the scientific Python ecosystem for doing data analysis.

a)

True

b)

False

18.

To get the number of dimensions of a Series object, ____________ attribute is displayed

a)

itemsize

b)

size

c)

index

d)

ndim

19.

To check if the Series object contains NAN values, _____________ attribute is displayed.

a)

hasnans

b)

nbytes

c)

ndim

d)

dtype

20.

To get the number of bytes of the Series Data, ___________________ attribute is used.

a)

index

b)

size

c)

itemsize

d)

ndim