A

Admin • 802.91K Points
Coach

Q. What will `df.sample(n=3)` do?

  • (A) Return the first 3 rows
  • (B) Return the last 3 rows
  • (C) Return 3 random rows
  • (D) Return rows with 3 in them
  • Correct Answer - Option(C)
  • Views: 4
  • Filed under category Pandas
  • Hashtags:

Explanation by: Admin
`sample(n=3)` returns 3 random rows from the DataFrame.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.