What does df.head() return in pandas?

Select the correct answer: Single Choice

Key points

  • df.head() returns the first few rows of the DataFrame
  • It is a quick way to preview the data
  • Default number of rows returned is 5
  • Useful for understanding the structure of the DataFrame

Ready to go further?