Databricks Certified Associate Developer For Apache Spark 30 · Free Practice Question Medium

Question 17

The code block shown below should return a new DataFrame with 25 percent of random records from dataframe df with replacement. Choose the response that correctly fills in the numbered blanks within the code block to complete this task. 


Code block: 

df._1_(_2_, _3_, _4_)

  • A

    1. sample

    2. False

    3. 0.25

    4. 5

  • B

    1. sample

    2. True

    3. 0.5

    4. 25

  • C

    1. sample

    2. True

    3. 25

    4. 5

  • D

    1. random

    2. True

    3. 0.25

    4. 5

  • E

    1. sample

    2. withReplacement

    3. 0.25

    4. 5

  • F

    1. sample

    2. True

    3. 0.25

    4. 5

Reveal correct answer

Correct answer: F

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need