wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Sjmit-Q2-[Workshop-MAR-25]

Total questions: 20

Worksheet time: 7mins

Name
Class
Date
1.

What function is used to create a Numpy array from a list?

a)

numpy.array

b)

numpy.create_array

c)

numpy.array_from_list

d)

numpy.list

2.

How do you create a 2D Numpy array with shape (3, 4)?

a)

numpy.ones((4, 3))

b)

numpy.zeros((3, 4))

c)

numpy.empty((2, 6))

d)

numpy.array((3, 4))

3.

What is the default data type of a Numpy array if not specified?

a)

int32

b)

complex128

c)

float64

d)

float32

4.

How can you access the first element of a Numpy array named 'arr'?

a)

arr.first()

b)

arr.get(0)

c)

arr[1]

d)

arr[0]

5.

What method is used to create a Pandas DataFrame from a dictionary?

a)

pd.DataFrame()

b)

pd.createDataFrame()

c)

pd.DataFrameBuilder()

d)

pd.DataFrameFromDict()

6.

How do you display the first 5 rows of a DataFrame in Pandas?

a)

df.slice(0, 5)

b)

df.head()

c)

df.show(5)

d)

df.first(5)

7.

What function is used to check for missing values in a DataFrame?

a)

checknull()

b)

findMissing()

c)

isna()

d)

isnull()

8.

How can you drop rows with missing values in a DataFrame?

a)

Invoke df.clearna() to remove rows with missing data.

b)

Apply df.drop() to discard rows with NaN entries.

c)

Use df.remove() to eliminate rows with missing values.

d)

Use df.dropna() to drop rows with missing values.

9.

What is the purpose of the 'groupby' method in Pandas?

a)

To group data for aggregation or transformation.

b)

To filter out specific rows from a DataFrame.

c)

To sort data in ascending order.

d)

To merge two DataFrames into one.

10.

How do you visualize data using Pandas?

a)

Use the .visualize() method on a DataFrame.

b)

Export data to Excel for visualization.

c)

Create visualizations using Matplotlib only.

d)

Use the .plot() method on a DataFrame or Series.

11.

What is the first step in Exploratory Data Analysis (EDA)?

a)

Clean the data

b)

Understand the data

c)

Collect the data

d)

Visualize the data

12.

How can you summarize the statistics of a DataFrame in Pandas?

a)

Apply df.info() for a summary of the DataFrame's structure.

b)

Call df.stats() to retrieve statistical information.

c)

Use df.summary() to get a quick overview of the DataFrame.

d)

Use df.describe() to summarize the statistics of a DataFrame in Pandas.

13.

What method would you use to rename columns in a DataFrame?

a)

df.change_columns({'old_name1': 'new_name1'})

b)

df.rename(columns={'old_name1': 'new_name1', 'old_name2': 'new_name2'})

c)

df.set_column_labels({'old_name1': 'new_name1', 'old_name2': 'new_name2'})

d)

df.update_column_names({'old_name2': 'new_name2'})

14.

How do you filter rows in a DataFrame based on a condition?

a)

df.select(condition)

b)

df[condition] where 'condition' is a boolean expression applied to a DataFrame column.

c)

df.rows(condition)

d)

df.filter(condition)

15.

What is the purpose of data normalization in data cleaning?

a)

To eliminate all duplicate entries.

b)

The purpose of data normalization is to standardize data formats and ensure consistency.

c)

To enhance the visual representation of data.

d)

To increase the size of the dataset.

16.

How can you plot a histogram of a column in a DataFrame?

a)

Call hist() on the DataFrame directly without specifying a column.

b)

Use DataFrame.plot.hist(column='column_name') to create a histogram.

c)

Use DataFrame['column_name'].plot(kind='bar') to plot a histogram.

d)

Use DataFrame['column_name'].hist() to plot a histogram of a column in a DataFrame.

17.

What is the significance of checking data types in a DataFrame?

a)

It has no impact on the analysis process.

b)

It helps in visualizing data more effectively.

c)

It is significant for data integrity, error prevention, and performance optimization.

d)

It is only important for large datasets.

18.

How do you handle outliers in a dataset during EDA?

a)

Identify, visualize, and either cap, transform, or remove outliers based on analysis.

b)

Always remove outliers without further investigation.

c)

Assume outliers are errors and correct them automatically.

d)

Ignore outliers completely and proceed with analysis.

19.

What is the role of correlation analysis in EDA?

a)

Correlation analysis measures the average of variables.

b)

Correlation analysis is used to predict future outcomes.

c)

Correlation analysis eliminates outliers from the data.

d)

Correlation analysis helps identify relationships between variables in EDA.

20.

How can you visualize the relationship between two variables in Pandas?

a)

Use scatter plots or line plots with Pandas' plot method.

b)

Use bar charts to compare categories.

c)

Create pie charts for each variable.

d)

Utilize histograms to show frequency distributions.