1. Home
  2. Data Science
  3. Python
  4. Which DataFrame method shows the first five rows by…

Added 25 Nov 2026

Which DataFrame method shows the first five rows by default in Python?

  1. head() Correct answer
  2. top()
  3. first()
  4. show()

Correct answer

A. head()

5 views

MCQSEXAM

Explanation

df.head(n) displays the first n rows.

Reference

Asked in: Python Interview Data Libraries

https://docs.python.org/3/library/index.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs