Match List-I with List-II
List-I List-II (A) df.drop(column=['A']) (I) Changing the name of a column (B) df.head(n) (II) Delete column (C) df.rename(column={'A':'Alpha'}) (III) Select first 'n' rows (D) df.tail(n) (IV) Select the last 'n' rows
Match List-I with List-II
| List-I | List-II |
|---|---|
| (A) df.drop(column=['A']) | (I) Changing the name of a column |
| (B) df.head(n) | (II) Delete column |
| (C) df.rename(column={'A':'Alpha'}) | (III) Select first 'n' rows |
| (D) df.tail(n) | (IV) Select the last 'n' rows |
Solution
✅ Correct Option: 2
| List I | List II |
|---|---|
| (A) df.drop(column=['A']) | (II) Delete column |
| (B) df.head(n) | (III) Select first 'n' rows |
| (C) df.rename(column={'A':'Alpha'}) | (I) Changing the name of a column |
| (D) df.tail(n) | (IV) Select the last 'n' rows |
head means the top of the data, tail means the end. In pandas, the actual keyword is columns (for example df.drop(columns=['A'])), but the match is the same.
Options 1 and 4: swap head and tail. head(n) gives the first n rows and tail(n) gives the last n rows.
Related questions:
2026: 21 May Shift 1
2026: 29 May Shift 2
2026: 29 May Shift 2