Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

TRYING

Total questions: 25

Worksheet time: 10mins

Name
Class
Date
1.

Choose the correct option 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

2.

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

a)

3 values from front

b)

3 values from last

c)

5 values

d)

none

3.

How many rows are returned by Series.head(5) ?

a)

2

b)

3

c)

4

d)

5

4.

we can analyze the data in pandas with :

a)

Series

b)

Dataframe

c)

Both

d)

none

5.

Series in Pandas is

a)

1 Dimensional Array

b)

2 Dimensional array

c)

3 Dimensional array

d)

none of above

6.

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

a)

numpy

b)

pandas

c)

django

d)

none

7.

Series can be created from

a)

Array

b)

Dictionary

c)

Scatter value

d)

All of them

8.

pandas is a:

a)

Data Structure

b)

Series

c)

Dataframe

d)

Library

9.

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

10.

write the output:

import pandas as pd

s=pd.Series([22,44,66],index=['b','e','h'])

print(s)

a)

b 22

e 44

h 66

dtype: int64

b)

b 22

e 44

dtype: int64

c)

none of the above

11.

Find the correct output of the given snippet:

import pandas as pd

d=[30,54,17,24]

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

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

a)

b 54

c 17

d 24

dtype: float64

b)

b 54

c 17

d 24

dtype: object

c)

c 17

d 24

dtype: int64

d)

b 54

c 17

d 54

dtype: int64

12.

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

13.

Which is not a feature of series

a)

Homogeneous data

b)

Immutable size

c)

Mutable data

d)

Multiple rows

14.

Series can be created from

a)

Array

b)

Dictionary

c)

Scatter value

d)

All of them

15.

Choose the Best way to import the pandas module in your python program ?

a)

1.import pandas

b)

2.import pandas as pd

c)

3.from pandas import *

d)

4.All of the above

16.

The SQL statement to count distinct rows from a column is,

a)

select COUNT DISTINCT columnname AS total_rows from tablename;

b)

select (COUNT DISTINCT columnname) AS total_rows from tablename;

c)

select DISTINCT columnname AS total_rows from tablename;

d)

select COUNT (DISTINCT) AS total_rows from tablename;

17.

The COUNT() function also counts the NULL values.

a)

True

b)

False

18.

The SUM() function returns - - -

a)

some random values from the given column

b)

the total number of columns in the database

c)

the total number of tables in the given databases

d)

the total sum of a given numeric column

19.

In a column named "age", containing values 4, 5, 0, NULL, 6 the SQL statement "SELECT SUM(age) FROM students;" will return,

a)

3

b)

15

c)

0

d)

1

20.

The average value of the given numeric column is calculated by using - - - function.

a)

GETAVG()

b)

FINDAVG()

c)

AVG()

d)

AVGVALUE()

21.

Which one of the following is an Multiple row Functions?

a)

COUNT()

b)

LEN()

c)

AVERAGE()

d)

NOW()

22.

A table T_COUNT has 12 number values as 1, 2, 3, 32, 1, 1, null, 24, 12, null, 32, null. Predict the output of the below query.

SELECT COUNT (*) FROM t_count;
a)

12

b)

6

c)

9

d)

Throws exception because COUNT function doesn't works with NULL values

23.

A table stud has a column age with 7 records as 10, 12, 13, 32, null, 24, null. Predict the output of the below query.

SELECT COUNT (age) FROM stud;

a)

5

b)

6

c)

Error

d)

7

24.

A table Books has a column DateOfPurchase with 4 records as NULL, 22-1-2008, 18-3-2008, 24-1-2011. Predict the output of the below query.

SELECT MAX (dateofPurchase) FROM Books;

a)

24-1-2011

b)

22-1-2008

c)

NULL

d)

18-3-2008

25.

A table Books has a column DateOfPurchase with 4 records as NULL, 22-1-2008, 18-3-2008, 24-1-2011. Predict the output of the below query.

SELECT MIN (dateofPurchase) FROM Books;

a)

24-1-2011

b)

22-1-2008

c)

NULL

d)

18-3-2008