Skip to main contentSkip to solution

Which of the following statements are TRUE for NumPy Arrays?

(A) There is no concept of NaN values in NumPy.

(B) NumPy occupy less memory than a Series.

(C) The indexing starts with zero for the first element in NumPy.

(D) NumPy arrays are accessed by their integer position using numbers or letters.

Solution

✅ Correct Option: 4

(B) is true because a NumPy array stores only the values in one contiguous block of a single data type. A pandas Series stores an index along with the values, so it uses more memory.

(C) is true because NumPy indexing is zero-based, so the first element is at position 0.


(A): False. NumPy has np.nannp.nan, a floating-point NaN value. Pandas uses it to represent missing data.

(D): False. NumPy arrays are accessed only by integer position. Letters or custom labels as an index belong to a Series (or DataFrame).

Keyboard Shortcuts

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