QuestionQ139

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which of the following code blocks returns a 15 percent sample of rows from the DataFrame storesDF without replacement?

Explanation

DataFrame.sample() samples without replacement by default when withReplacement is not specified. Setting fraction = 0.15 requests a sample with an expected size of 15 percent of the DataFrame’s rows.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!