KnowledgeBoat Logo
|

Informatics Practices

To display last five rows of a Series object S, you may write …………… .

  1. head()
  2. head(5)
  3. tail()
  4. tail(5)

Python Pandas

1 Like

Answer

tail(), tail(5)

Reason — The syntax to display the last n rows of a Series object is <Series Object>.tail([n]). Therefore, according to this syntax, tail(5) will display last five rows of a Series object S. If n value is not specified, then tail() will return the last 5 rows of a Series object.

Answered By

2 Likes


Related Questions