Which of the following statements are TRUE in the context of Pandas Series?
A. The elements can be indexed in descending order also.
B. We can not define our own labeled index to access elements of an array.
C. We can define our own labeled index to access elements of an array.
D. Series requires less memory as compared to NumPy arrays.
Which of the following statements are TRUE in the context of Pandas Series?
A. The elements can be indexed in descending order also.
B. We can not define our own labeled index to access elements of an array.
C. We can define our own labeled index to access elements of an array.
D. Series requires less memory as compared to NumPy arrays.
Solution
A Pandas Series allows negative indexing and reverse slicing (for example, s[::-1]), so its elements can be accessed in descending order. It also lets us define our own labels through the index argument, for example pd.Series([10, 20, 30], index=['a', 'b', 'c']), and then access elements with s['a']. So A and C are true.
Statement B: it contradicts C. Custom labelled indexes are the main feature that separates a Series from a NumPy array.
Statement D: a Series stores an index along with the values, so it generally needs more memory than a NumPy array, not less.
Related questions:
2025: 16 May Shift 1
2026: 13 May Shift 2
2025: 20 May Shift 1