wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Numpy_Pandas_Matplotlib

Total questions: 37

Worksheet time: 37mins

Name
Class
Date
1.

In simple linear regression, there is one dependent and one independent variable.

a)

There is one dependent and one independent variable

b)

There are multiple independent variables

c)

There are multiple dependent variables

d)

None of the above

2.

Ravel is used to convert 2D array into 1D array.

a)

To convert 1D array into 2D array

b)

To convert 2D array into 1D array

c)

It is used for fancy indexing

d)

None of the above

3.

Which of the following library used for implementation of ML Algorithm?

a)

Sklearn

b)

Seaborn

c)

Pandas

d)

Matplot

4.

Histogram is used to check the distribution of data.

a)

To check the distribution of data

b)

To normalize the data

c)

To standardize the data

d)

None of the Above

5.

How you check the spread of the data?

a)

Variance

b)

Std. Deviation

c)

IQR

d)

All of the above

6.

How can we change the shape of Numpy array in python?

a)

Shape()

b)

Reshape()

c)

Ord()

d)

Change()

7.

Which of the following library used for data analysis?

a)

Sklearn

b)

Seaborn

c)

Pandas

d)

Matplot

8.

Which of the following is used to drop duplicate records in pandas?

a)

df.drop_duplicates()

b)

df.drop()

c)

df.drop_duplicate()

d)

df.remove()

9.

How to convert data in data frame to numpy array?

a)

values

b)

arange

c)

reshape

d)

ravel

10.

Which of the property of pandas is used to convert the data in numpy array?

a)

ndim

b)

value

c)

values

d)

shape

11.

Which of the following used to check the statistical summary?

a)

ndim

b)

describe

c)

series

d)

dataFrame

12.

Which of the following is used for imputation of numeric continuous data?

a)

Mean

b)

Mode

c)

Median

d)

None of the above

13.

Which of the following library is used for data preprocessing?

a)

matplotlib

b)

seaborn

c)

pandas

d)

scipy

14.

Which of the following is used for imputation of numerical discrete data?

a)

Mean

b)

Mode

c)

Median

d)

None of the above

15.

Which of the following library handles imputation of categorical data?

a)

Sklearn

b)

Seaborn

c)

Pandas

d)

Matplot

16.

Heatmap is used to check the correlation among feature and label.

a)

To check the correlation among feature and label

b)

To visualize the data

c)

To check the outliers

d)

None of the above

17.

Which of the following is used for imputation of categorical data?

a)

Mean

b)

Mode

c)

Median

d)

None of the above

18.

Which of the following methods is used to read a CSV file in pandas?

a)

pd.read_csv()

b)

pd.read()

c)

pd.readfile()

d)

pd.load_csv()

19.

In NumPy, which function is used to create an array of evenly spaced values within a given range?

a)

linspace()

b)

arange()

c)

range()

d)

spacing()

20.

Which of the following pandas functions is used to combine two data frames along columns?

a)

pd.concat()

b)

pd.merge()

c)

pd.join()

d)

pd.combine()

21.

Which NumPy function returns the indices of non-zero elements?

a)

np.where()

b)

np.nonzero()

c)

np.argmax()

d)

np.argwhere()

22.

Which pandas method removes missing values?

a)

dropna()

b)

fillna()

c)

replace()

d)

remove()

23.

Which of the following is true about .loc[] in pandas?

a)

Selects rows/columns by label

b)

Selects rows/columns by integer position

c)

Works only for numeric indexes

d)

None of the above

24.

Which NumPy method is used to get the shape of an array?

a)

shape

b)

len()

c)

size

d)

reshape()

25.

Which pandas function is used to merge datasets similar to SQL join?

a)

pd.concat()

b)

pd.merge()

c)

pd.append()

d)

pd.combine()

26.

Which NumPy function is used to compute the mean along a given axis?

a)

np.avg()

b)

np.mean()

c)

np.median()

d)

np.sum()

27.

Which parameter in pd.read_csv() is used to treat a column as the index?

a)

index_col

b)

col_index

c)

primary_key

d)

id_col

28.

Which of the following is used to sort a pandas DataFrame by column values?

a)

sort_values()

b)

sort_index()

c)

order_by()

d)

sort()

29.

Which NumPy function is used to find the maximum value of an array?

a)

np.max()

b)

np.maximum()

c)

np.argmax()

d)

np.maxvalue()

30.

What does df.T do in pandas?

a)

Converts DataFrame into tuple

b)

Transposes the DataFrame

c)

Converts DataFrame into text

d)

None of the above

31.

Which method is used to check the data type of each column in a pandas DataFrame?

a)

dtypes

b)

types()

c)

dtype()

d)

datatype()

32.

In NumPy, what does axis=0 represent in aggregation functions?

a)

Operate across rows

b)

Operate across columns

c)

Operate diagonally

d)

None of the above

33.

Which function is used to create an identity matrix in NumPy?

a)

np.identity()

b)

np.eye()

c)

Both a & b

d)

np.ones()

34.

Which pandas method is used to replace NaN values with a specific value?

a)

fillna()

b)

dropna()

c)

replace()

d)

setna()

35.

What does np.argsort() return?

a)

Sorted array values

b)

Indices that would sort the array

c)

Maximum index value

d)

None of the above

36.

Which of the following in pandas is used for group operations like SQL GROUP BY?

a)

groupby()

b)

aggregate()

c)

merge()

d)

concat()

37.

In NumPy, which method is used to flatten a multi-dimensional array?

a)

flatten()

b)

reshape(-1)

c)

ravel()

d)

All of the above