A

Admin • 828.03K Points
Coach

Q. Which function is used to randomly shuffle rows?

  • (A) df.shuffle()
  • (B) df.sample(frac=1)
  • (C) df.random()
  • (D) df.mix()
  • Correct Answer - Option(B)
  • Views: 7
  • Filed under category Pandas
  • Hashtags:

Explanation by: Admin
`sample(frac=1)` randomly reorders the rows.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.