Which of the following statements are TRUE?
(A) A Series is a one-dimensional array containing a sequence of values.
(B) A DataFrame is a two-dimensional labelled data structure like a spreadsheet.
(C) When labelled indexes are used for slicing, the value at the end of the index position is excluded.
(D) The basic difference between Pandas Series and NumPy ndarray is that operations between Series automatically align the data based on labels.
Which of the following statements are TRUE?
(A) A Series is a one-dimensional array containing a sequence of values.
(B) A DataFrame is a two-dimensional labelled data structure like a spreadsheet.
(C) When labelled indexes are used for slicing, the value at the end of the index position is excluded.
(D) The basic difference between Pandas Series and NumPy ndarray is that operations between Series automatically align the data based on labels.
Solution
(A), (B) and (D) are true.
A Series is a one-dimensional labelled array. A DataFrame is a two-dimensional labelled structure, like a spreadsheet or SQL table. Arithmetic between two Series aligns values by index label, whereas NumPy ndarrays work by position.
Statement (C) is false. With labelled indexes (for example s['a':'c'] or .loc), the end label is included. Only position-based slicing (for example s[0:3] or .iloc) excludes the end position.
Related questions:
2026: 13 May Shift 2
2026: 23 May Shift 1
2026: 23 May Shift 2
2025: 27 May Shift 2