Question:

Extracting a part of a series can be done through .

Show Hint

A part of a series is extracted by slicing. Use s[a:b].
Updated On: Oct 1, 2026
  • Indexing
  • Subtracting
  • Slicing
  • Partitioning
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Understanding the Concept:
A Pandas Series is a one-dimensional labelled array. To take a part of a series, such as the first three items, we use a slice like s[0:3]. The operation is called slicing.

Step 2: Check option 1.
Indexing picks a single element by its label or position, for example s[2]. It does not extract a part (a range) of the series. So option 1 is wrong.

Step 3: Check option 2.
Subtracting is an arithmetic operation between values or series. It does not cut out a part of a series. So option 2 is wrong.

Step 4: Check option 3.
Slicing extracts a range of elements from a series, for example s[1:4] or s.iloc[1:4]. So option 3 is correct.

Step 5: Check option 4.
Partitioning is not a Pandas Series operation for selecting a part. So option 4 is wrong.

Step 6: Final Answer:
Extracting a part of a series is called slicing, which is option 3. \[ \boxed{3} \]
Was this answer helpful?
0
0