Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Test#1

Total questions: 10

Worksheet time: 3hrs 30mins

Name
Class
Date
1.

What does Pandas stand for?

4 lines
2.

Pandas series is _____ and size _____

a)

heterogeneous, immutable

b)

homogeneous, mutable

c)

heterogeneous, mutable

d)

homogeneous, immutable

3.

>>> df1 = pd.DataFrame([

[1,2,3],

[4,5,6],

[7,8,9]])

>>> print(df1.iat[1, 2])

What will be the output?

a)

5

b)

6

c)

9

d)

2

4.

>>> ser1 = pd.Series(['Z', 'b', 'E', 'a', 'W'])

>>> print(ser1.max())

What will be the output?

a)

Z

b)

a

c)

b

d)

E

5.

Which of the following is used to specify a heading for the graph to be plotted?

a)

plt.xlabel()

b)

plt.title()

c)

plt.header()

d)

plt.label()

6.

Name the functions used to generate the following charts:

I. Line chart

II. Bar graph

III. Histogram

a)

I. plt.Plot()

II. plt.bar()

III. plt.his()

b)

I. plt.plot()

II. plt.Bar()

III. plt.hist()

c)

I. plt.plot()

II. plt.bar()

III. plt.hist()

d)

I. plt.plot()

II. plt.bar()

III. plt.His()

7.

>>> ser1 = pd.Series([12, 13, np.nan, np.nan, 45, 56])

>>> print(ser1.count())

What will be the output of this program?

a)

6

b)

5

c)

4

d)

56

8.

>>> ser1 = pd.Series(3*1**3, index = range(2, 12, 2))

What will be the output of this program?

a)

2 3

4 3

6 3

8 3

10 3

b)

2 9

4 9

6 9

8 9

10 9

c)

2 3

4 3

6 3

8 3

10 3

12 3

d)

2 9

4 9

6 9

8 9

10 9

12 9

9.

Which function can be used to save your dataframe as a CSV file?

a)

pd.write_csv()

b)

pd.to_csv()

c)

pd.save_csv()

d)

pd.convert_csv()

10.

Who developed Pandas?

a)

Paul McKinney

b)

Wes McCarty

c)

Wes McKinney

d)

Paul McCarty