wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Libraries Series - Pandas

Total questions: 11

Worksheet time: 22mins

Name
Class
Date
1.

What does this line of code do?

a)

Selects cols with vals > 1

b)

Selects cols without NaN

c)

Selects cols with any vals >1

d)

Selects cols with NaN

2.

What does this line of code do?

a)

Selects cols with vals > 1

b)

Selects cols without NaN

c)

Selects cols with any vals >1

d)

Selects cols with NaN

3.

What does this line of code do?

a)

Drops NaN values

b)

Replaces values with others

c)

Fills NaN values with a predetermined value

4.

This is an example of _______.

a)

Data aggregation

b)

Data transformation

c)

Data visualisation

d)

Imputing missing values

e)

Checking for duplicates

5.

What does this line of code do?

a)
b)
c)
6.

What does this line of code do?

a)
b)
7.

_____ is a two-dimensional labelled data structure with columns of potentially different types, while_____ is a one-dimensional labelled array capable of holding any data type

a)

Series, DataFrame

b)

DataFrame, Series

8.

____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()

9.

Find correct descriptions

a)

a. Subsets the data

b. Filters on values

c. Selects and reset the index

b)

a. Selects columns with specific data type

b. Filters on values

c. Selects specific elements

c)

a. Finds same elements

b. Filters on values

c. Selects specific elements

10.

What does this line of code do?

a)

Returns unique values

b)

Checks duplicates

c)

Drops duplicates

d)

Checks index duplicates

11.

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.