Skip to main contentSkip to solution

Which statements about Pandas 'Series' are TRUE?

A. A Series can have duplicate index labels.

B. The data in a Series must be homogeneous.

C. A Series cannot contain NaN values.

D. The index can be of any data type.

Solution

✅ Correct Option: 1

A: True. Index labels in a Series need not be unique, e.g. pd.Series([1, 2, 3], index=['a', 'a', 'b']) works.

B: True. A Series stores its data under a single dtype. Mixed values are all converted to one common type (for example object).

D: True. The index can hold integers, strings, dates and other hashable types.


C: False. A Series can hold NaN, which is how pandas represents missing data. Functions like isna(), fillna() and dropna() exist for this reason.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question