CBSE Class 12 Informatics Practices Question 10 of 40

Practice Paper — Question 10

Back to all questions
10
Question

Question 10

Which of the following command will show the last 3 rows from a Pandas Series named NP ?

  1. NP.Tail()
  2. NP.tail(3)
  3. NP.TAIL(3)
  4. All of the above
Answer

NP.tail(3)

Reason — The syntax to display the last n rows of a Series object is <Series Object>.tail([n]). Therefore, according to this syntax, NP.tail(3) will display last three rows of a Series object NP.