Which of the following code blocks returns a 15 percent sample of rows from DataFrame storesDF without replacement?
Which of the following code blocks returns a 15 percent sample of rows from DataFrame storesDF without replacement?
To obtain a 15 percent sample of rows from a DataFrame without replacement, the correct method is `sample(fraction = 0.15)`. This function will return a DataFrame containing approximately 15% of the rows from the original DataFrame. The parameter `fraction` specifies the proportion of the DataFrame to sample, and by default, sampling is done without replacement.
B. storesDF.sample(fraction = 0.15)