wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Pandas

Total questions: 38

Worksheet time: 19mins

Name
Class
Date
1.

Best way to import the pandas module in your program ?

a)

1.import pandas as p

b)

2.import pandas as pd

c)

3.import pandas as d

d)

4.All of the above

2.

DataFrame in pandas is

a)

1. dimensional array

b)

2. dimensional array

c)

3.dimensional array

d)

4.None of the above

3.

All pandas data structures are ___ mutable but not always _______mutable.

a)

a) size, value

b)

b) semantic, size

c)

c) value, size

d)

d) none of the mentioned

4.

Which is not a feature of series

a)

Homogeneous data

b)

Immutable size

c)

Mutable data

d)

Multiple rows

5.

Pandas deals with following data structures

a)

Series

b)

Series and Data Frames

c)

Series, DataFrames and Panel

d)

None of Above

6.

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

7.

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

a)

3 values from front

b)

3 values from last

c)

5 values

d)

none

8.

Series.head() will return how many rows.

a)

2

b)

3

c)

4

d)

5

9.

we can analyze the data in pandas with :

a)

Series

b)

Dataframe

c)

Both

d)

none

10.

Series in Pandas is

a)

1 Dimensional Array

b)

2 Dimensional array

c)

3 Dimensional array

d)

none of above

11.

In data science, which of the python library is more popular ?

a)

numpy

b)

pandas

c)

django

d)

none

12.

Which is not a feature of series

a)

Homogeneous data

b)

Immutable size

c)

Mutable data

d)

Multiple rows

13.

Which package should be needed for series

a)

Maths

b)

Statistic

c)

Pandas

d)

Random

14.

Full form of NaN is

a)

Not a Null

b)

Not a Number

c)

Not a Numeric

d)

None of these

15.

pandas is a:

a)

Data Structure

b)

Series

c)

Dataframe

d)

Library

16.

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

17.

write the output:

import pandas as pd1

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

t = pd1.Series([1,2,4])

u=s-t

print (u)

a)

0 1

1 0

2 1

dtype: int64

b)

0 0

1 0

2 1

dtype: int64

c)

0 0

1 0

2 -1

dtype: float64

d)

0 0

1 0

2 -1

dtype: int64

18.

write the output:

import pandas as pd

s=pd.Series([1,2,3,4],index=['a','b','c','d'])

print(s.iloc[2:4])

a)

b 2

c 3

d 4

dtype: int64

b)

b 3

c 4

dtype: int64

c)

c 3

d 4

dtype: int64

d)

none of the above

19.

write the output:

import pandas as pd

s=pd.Series([1,2,3,4],index=['a','b','c','d'])

print(s.loc['b':'d'])

a)

b 2

c 3

d 4

dtype: float64

b)

b 2

c 3

d 4

dtype: object

c)

c 3

d 4

dtype: int64

d)

b 2

c 3

d 4

dtype: int64

20.

To extract subset from Series,the following function is used

a)

row()

b)

column()

c)

loc()

d)

all

21.

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

22.

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

a)

3 values from front

b)

3 values from last

c)

5 values

d)

none

23.

Series.head() will return how many rows.

a)

2

b)

3

c)

4

d)

5

24.

To extract subset from Series,the following function is used

a)

row()

b)

column()

c)

loc()

d)

all

25.

we can analyze the data in pandas with :

a)

Series

b)

Dataframe

c)

Both

d)

none

26.

Series in Pandas is

a)

1 Dimensional Array

b)

2 Dimensional array

c)

3 Dimensional array

d)

none of above

27.

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

a)

0

b)

1

c)

2

d)

3

28.

In data science, which of the python library are more popular ?

a)

numpy

b)

pandas

c)

django

d)

none

29.

Which is not a feature of series

a)

Homogeneous data

b)

Immutable size

c)

Mutable data

d)

Multiple rows

30.

Series can be created from

a)

Array

b)

Dictionary

c)

Scatter value

d)

All of them

31.

Which package should be needed for series

a)

Maths

b)

Statistic

c)

Pandas

d)

Random

32.

Full form of NaN is

a)

Not a Null

b)

Not a Number

c)

Not a Numeric

d)

None of these

33.

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

34.

pandas is a:

a)

Data Structure

b)

Series

c)

Dataframe

d)

Library

35.

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

36.

write the output:

import pandas as pd1

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

t = pd1.Series([1,2,4])

u=s-t

print (u)

a)

0 1

1 0

2 1

dtype: int64

b)

0 0

1 0

2 1

dtype: int64

c)

0 0

1 0

2 -1

dtype: float64

d)

0 0

1 0

2 -1

dtype: int64

37.

write the output:

import pandas as pd

s=pd.Series([1,2,3,4],index=['a','b','c','d'])

print(s.iloc[2:4])

a)

b 2

c 3

d 4

dtype: int64

b)

b 3

c 4

dtype: int64

c)

c 3

d 4

dtype: int64

d)

none of the above

38.

write the output:

import pandas as pd

s=pd.Series([1,2,3,4],index=['a','b','c','d'])

print(s.loc['b':'d'])

a)

b 2

c 3

d 4

dtype: float64

b)

b 2

c 3

d 4

dtype: object

c)

c 3

d 4

dtype: int64

d)

b 2

c 3

d 4

dtype: int64