Unit 4: Data Analysis with NumPy and Pandas - Subjective Questions

CAP776 — Programming In Python • Practice Questions with Detailed Answers

20 questions

1

Define the NumPy ndarray object and explain its main characteristics. How is it different from a standard Python list?

2

Explain the meaning of dimensions, axes, shape, size, and ndim in a NumPy array with suitable examples.

3

Describe different methods for creating NumPy arrays. Include examples using lists, ranges, zeros, ones, identity matrices, and random values.

4

Explain how array elements are accessed in one-dimensional, two-dimensional, and three-dimensional NumPy arrays.

5

Explain NumPy slicing and boolean indexing. Discuss how they can be used to select and filter array elements.

6

Describe important NumPy array manipulation operations such as reshaping, flattening, transposing, concatenating, and splitting.

7

Explain broadcasting in NumPy. State its rules and illustrate how it simplifies arithmetic operations on arrays.

8

Explain common NumPy mathematical and statistical operations. How are aggregation functions applied along different axes?

9

What is an N-dimensional NumPy array? Explain how its structure, indexing, and operations differ from those of one-dimensional arrays.

10

Define a Pandas Series and DataFrame. Compare their structure, purpose, and typical uses.

11

Explain how to inspect and understand a Pandas DataFrame using attributes and methods such as head(), tail(), info(), describe(), shape, and dtypes.

12

Describe the process of reading CSV and HTML data into Pandas and writing a DataFrame back to a file.

13

Explain different ways of selecting rows and columns in Pandas using labels, positions, Boolean conditions, and lists of column names.

14

Discuss common Pandas operations for modifying, sorting, renaming, and deleting data in a DataFrame.

15

Explain grouping and aggregation in Pandas. Describe how groupby() can be used to summarize data.

16

Explain how functions are applied to Pandas data using map(), apply(), and applymap() or element-wise alternatives. Include suitable examples.

17

Explain the data cleaning process in Pandas. Why is data cleaning essential before analysis?

18

Discuss methods for detecting and handling missing values in Pandas. Compare deletion and imputation approaches.

19

Explain how duplicate records, inconsistent text, and incorrect data types can be identified and corrected in Pandas.

20

What are outliers? Explain methods for detecting and handling outliers in a numerical Pandas column.