Unit 13: NumPy and Pandas - Subjective Questions

ECAP792 • Practice Questions with Detailed Answers

20 questions

1

Define Python and explain why it is widely used in data science.

2

Describe the main built-in data structures in Python and give a suitable use case for each.

3

What is NumPy? Explain the important features of a NumPy ndarray.

4

Compare Python lists and NumPy arrays with respect to data type, memory usage, speed, and operations.

5

Explain different methods of creating NumPy arrays, with suitable examples.

6

Explain the concepts of shape, dimension, size, axes, and reshaping in NumPy.

7

Describe indexing, slicing, and Boolean masking in NumPy arrays. Include examples for one-dimensional and two-dimensional arrays.

8

What are vectorization and broadcasting in NumPy? Explain the broadcasting rules with examples.

9

Explain data types in Python and distinguish dynamically typed Python objects from fixed-type NumPy arrays.

10

Describe NumPy data types, type inference, type casting, and the possible risks of conversion.

11

What is Pandas? Explain the structure and major differences between a Series and a DataFrame.

12

Explain how Pandas Series objects can be created from lists, dictionaries, scalar values, and NumPy arrays.

13

Explain data selection in a Pandas Series using bracket notation, loc, iloc, slicing, and Boolean masks.

14

Describe different ways to create a Pandas DataFrame and explain the role of its row index and column labels.

15

Explain data selection in a Pandas DataFrame using column selection, loc, iloc, slicing, and conditional filtering.

16

Distinguish between loc, iloc, at, and iat in Pandas. When should each indexer be used?

17

What is missing data in Pandas? Explain how Pandas represents and detects missing values.

18

Explain how dropna() is used to handle missing data. Discuss the effects of axis, how, thresh, and subset.

19

Describe different strategies for filling missing values in Pandas using fillna(), forward filling, backward filling, and statistical imputation.

20

Design and explain a Pandas workflow for inspecting, selecting, cleaning, and summarizing a dataset containing missing values.