Skip to main contentSkip to solution

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

✅ Correct Option: 4

(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.

Keyboard Shortcuts

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