Skip to main contentSkip to solution

_______________ attribute name is used to display a NumPy ndarray having all the values in the DataFrame, without the axes labels.

Solution

✅ Correct Option: 4

DataFrame.values returns the data of the DataFrame as a NumPy ndarray. It contains only the values, with the row and column labels left out.


Option 1: columns returns only the column labels (an Index object), not the data.

Option 2: size returns a single integer, the total number of elements (rows x columns).

Option 3: shape returns a tuple of the number of rows and columns, not the data.

In newer pandas, DataFrame.to_numpy() is the recommended way to get the same ndarray.

Keyboard Shortcuts

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