Unit 5: Handling Data with Pandas; Data Visualisation with Matplotlib - Subjective Questions

ECE181 — Introduction To Python • Practice Questions with Detailed Answers

20 questions

1

Define Pandas. Explain the main features of the Pandas library and why it is preferred for data analysis in Python.

2

What is a Pandas Series? Explain how to create a Series with a suitable example.

3

What is a DataFrame? Describe its structure and list various ways of creating a DataFrame.

4

Distinguish between a Series and a DataFrame in Pandas.

5

Explain how to read from and write to CSV files using Pandas with examples.

6

Describe various operations that can be performed on a DataFrame with suitable code examples.

7

Explain the functions head(), tail(), info(), and describe() in Pandas with their uses.

8

What is Matplotlib? Explain its importance in data visualisation and describe the basic steps to create a plot.

9

Explain how to create a line plot in Matplotlib. Describe common customizations available for line plots with code.

10

Explain the concept of subplots in Matplotlib. How do you create multiple subplots in a single figure? Illustrate with an example.

11

What is a histogram? Explain how histograms are created in Matplotlib and where they are used.

12

Distinguish between a histogram and a bar chart.

13

Explain how to create a bar chart in Matplotlib. Describe the difference between vertical and horizontal bar charts with examples.

14

What is a pie chart? Explain how to create a pie chart in Matplotlib and mention its advantages and limitations.

15

Explain how to handle missing data in a Pandas DataFrame with appropriate methods and examples.

16

Explain indexing and selection in a DataFrame using loc[] and iloc[]. Distinguish between the two.

17

Describe how to add titles, labels, legends, and grids to a Matplotlib plot. Why are these elements important?

18

Explain the following DataFrame attributes: shape, size, columns, index, dtypes, and values.

19

How can Pandas and Matplotlib be used together for data visualisation? Explain with an example of plotting data directly from a DataFrame.

20

Compare line plots, bar charts, histograms, and pie charts. When should each be used?