wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Class-XII_IP_Revision-3

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

1.A two dimensional labelled array that is an ordered collection of columns to store heterogeneous data type is

a)

Series

b)

Numpy Array

c)

Dataframe

d)

Panel

2.
  1. 2. How can you create a DataFrame in pandas from a dictionary?

a)

df = pandas.DataFrame.from_dict()

b)

df = pandas.read_dict()

c)

df = pandas.DataFrame(dict)

d)

df = pandas.create.DataFrame()

3.
  1. 3. Which of the following will return the column labels of a DataFrame?

a)
  1. df.rows()

b)
  1. df.columns

c)
  1. df.labels()

d)
  1. df.colnames()

4.

4.Which method is used to remove rows with missing values?

a)

df.fillna()

b)

df.drop()

c)

df.remove()

d)

df.dropna()

5.

5. What does df.shape return?

a)

Number of columns only

b)

Number of rows only

c)

(Number of rows, Number of columns)

d)

Size of each column

6.

6. Which function returns the total number of non-null values in each column?

a)

df.count()

b)

df.size()

c)

df.length()

d)

df.notnull()

7.

7.How can you read a CSV file into a DataFrame?

a)

df = pandas.read_table('file.csv')

b)

df = pandas.open_csv('file.csv')

c)

df = pandas.read_csv('file.csv')

d)

df = pandas.readfile('file.csv')

8.

8.Which code will return only the first 3 rows of a DataFrame df?

a)

df.tail(3)

b)

df.loc[0:3]

c)

df.head(3)

d)

df.first(3)

9.

9.What will df.iloc[0] return?

a)

First row of the DataFrame

b)

First column

c)

Column labels

d)

Error

10.

10.What is the output of print(df.dtypes)?

a)

Shows missing values

b)

Shows datatype of each column

c)

Shows column names

d)

Shows column values