Databricks Certified Associate Developer for Apache Spark — Question 153

The code block shown below should return a new DataFrame that is the result of a position-wise union between DataFrame storesDF and DataFrame acquiredStoresDF. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.

Code block:

__1__.__2__(__3__)

Answer options

Correct answer: C

Explanation

The correct answer is C because 'storesDF.union(acquiredStoresDF)' correctly uses the union method on the storesDF DataFrame to combine it with acquiredStoresDF. Options A, B, D, and E are incorrect due to either using the wrong method (like concat or unionAll) or having typographical errors in the DataFrame names.