wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ML Viva

Total questions: 12

Worksheet time: 5mins

Name
Class
Date
1.

Which of the following is correct way to create a dataframe?

A. df = pd.dataframe(dict1)

B.df = pd.Dataframe(dict1)

C.df = pd.dataFrame(dict1)

D.df = pd.DataFrame(dict1)

a)

A

b)

B

c)

C

d)

D

2.

Which of the options contain the following lines?

1.           import pandas as pd

df = pd.read_csv("filename.csv") df.head()

a)

Loading a dataset into python

environment

See the first five rows of a data frame in

Python

b)

Checking the class of each variable in a

pandas DataFrame

c)

Code to see the dimensions of a data frame in Python

d)

Function used to find missing values in a

pandas DataFrame

3.

If there is a dataframe named as "df" and we need to extract the first three rows and three columns of it, then which of the following statement is correct?

A. df.iloc[1:4,1:4]

B. df.iloc[1:3,1:3]

C df.iloc[0:2,0:2]

D.df.iloc[0:3,0:3]

a)

A

b)

B

c)

C

d)

D

4.

A dataframe as two axis, where axis=0 respresents

A. Row

B.Column

C.Index

D. Values

a)

A

b)

B

c)

C

d)

D

5.

There is a student whose name is "Raman" and he wants to access "Author" column from "Book" dataframe. Suggest the correct statement.

A. print(Book.Author)

B.print(Book[‘Author’])

C. Both are True

D.Both are False

a)

A

b)

B

c)

C

d)

D

6.

What will be the output of the following code? import pandas as pd

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

A.1

B. 2

C.3

D.4

E.Error

a)

A

b)

B

c)

C

d)

D

e)

E

7.

The interface of matplotlib used for data visualisation is

A. pyplot

B. matlab

C. anaconda

D.seaborn

a)

A

b)

B

c)

C

d)

D

8.

Find the output list = [ ]

list[0] = 100 print(list)

A. 100

B. Error

C. [100]

D. [ ]

a)

A

b)

B

c)

C

d)

D

9.

In the follwing options which are python libraries which are used for data analysis and scientific computations

A. Numpy

B. Scipy

C. Pandas

D. All of the above

a)

A

b)

B

c)

C

d)

D

10.

Which operator is used in Python to import modules from packages?

A. .

B. *

C. ->

D. &

a)

A

b)

B

c)

C

d)

D

11.

Complete name

4 lines
12.

Complete Reg Number

4 lines