Match List-I with List-II
List-I List-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.
Match List-I with List-II
| List-I | List-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 I | List 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 .
Related questions:
2025: 14 May Shift 1
2026: 18 May Shift 2
2026: 23 May Shift 1
2026: 26 May Shift 1