S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which pandas method is used to randomly sample rows from a DataFrame?

  • (A) sample()
  • (B) rand()
  • (C) shuffle()
  • (D) take()
  • Correct Answer - Option(A)
  • Views: 1
  • Filed under category Pandas
  • Hashtags:

Explanation by: Shyam Dubey
The sample() method returns a random sample of rows or columns from a DataFrame.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.