Question:

In the context of creating a Pandas Series from a dictionary, which of the following statement is correct?

Show Hint

A dictionary key names an item, just like an index label in a Series. Match keys and values to the parts of the Series.
Updated On: Oct 20, 2026
  • The values of the dictionary become the indices of the Series.
  • The keys of the dictionary become the values of the Series.
  • The keys of the dictionary become the indices of the Series.
  • The Series will have default integer indices starting from 0, ignoring the dictionary keys.
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Recall the rule:
When a Series is created from a dictionary, Pandas uses the keys as the index labels.
The values of the dictionary become the data of the Series.

Step 2: Run a small example:
Take the dictionary {'a': 1, 'b': 2, 'c': 3} and pass it to pd.Series().
The index of the result is ['a', 'b', 'c'].
The values of the result are [1, 2, 3].
So the keys become the index and the values stay as values.

Step 3: Check each option:
Option 1 says the values become the indices. This reverses the rule, so it is wrong.
Option 2 says the keys become the values. This also reverses the rule, so it is wrong.
Option 3 says the keys become the indices. This matches the rule, so it is correct.
Option 4 says default integer indices are used. That happens only when we make a Series from a list, not from a dictionary. So it is wrong.

Final Answer:
The keys of the dictionary become the indices of the Series. This is option 3.
Was this answer helpful?
0
0

Top CBSE CLASS XII Informatics Practices Questions

View More Questions