Skip to main contentSkip to solution

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).

Keyboard Shortcuts

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