Objective:

Learn how to select specific rows from a DataFrame using indexing and display the required subset of data.

Task : Selecting Data

  1. Extract rows from index 100 to 110 from the given DataFrame.

  2. Display the first 5 rows of the result.

Python code:

import pandas as pd

selected_rows = df.iloc[100:111]

selected_rows.head(5)