Skip to main contentSkip to solution

Match List-I with List-II

List-IList-II
(A) DataFrame.head()(I) To display row labels.
(B) DataFrame.T(II) To display a tuple representing the dimensionality of the DataFrame.
(C) DataFrame.shape(III) Row indices and column labels of the DataFrame replace each other’s position.
(D) DataFrame.index(IV) To display the first 5 rows in the DataFrame.

Solution

✅ Correct Option: 2
List IList II
(A) DataFrame.head()(IV) To display the first 5 rows in the DataFrame.
(B) DataFrame.T(III) Row indices and column labels of the DataFrame replace each other's position.
(C) DataFrame.shape(II) To display a tuple representing the dimensionality of the DataFrame.
(D) DataFrame.index(I) To display row labels.

head() takes an optional number n and shows the first n rows, which is 5 by default. T is the transpose attribute, and shape returns a tuple such as (rows,columns)(rows, columns).

Keyboard Shortcuts

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