Informatics Practices

To get bottom 3 rows of a DataFrame, you may use …………… function.

  1. tail()
  2. tail(3)
  3. bottom()
  4. bottom(3)

Python Pandas

1 Like

Answer

tail(3)

Reason — The tail() function in pandas is used to get the bottom n rows of a DataFrame, where n is an optional argument. Hence, tail(3) is correct and will return the bottom 3 rows of the DataFrame.

Answered By

3 Likes


Related Questions