Which of the following is the correct command to display the top 2 records of Series 'Tail'?
Which of the following is the correct command to display the top 2 records of Series 'Tail'?
Solution
✅ Correct Option: 4
The Series is stored in the variable tail, and head(n) returns its first n records. So tail.head(2) gives the top 2 records, and print() displays them.
Option 1: uses s1, a different object, not the Series tail.
Option 2: the trailing . after head() is a syntax error.
Option 3: head() with no argument returns the default first 5 records, not 2.
tail(n) is the opposite method. It returns the last n records, so do not confuse it with head(n).
Related questions:
2025: 3 June Shift 2
2026: 20 May Shift 1
2025: 27 May Shift 2
2026: 23 May Shift 2