Exam Certified Associate Developer for Apache Spark All QuestionsBrowse all questions from this exam
Question 111

The code block shown below contains an error. The code block is intended to return a new DataFrame that is the result of a position-wise union between DataFrame storesDF and DataFrame acquiredStoresDF.

    Correct Answer: E

    To perform a position-wise union in PySpark between two DataFrames, the 'union' method should be used. Therefore, the correct code would be 'storesDF.union(acquiredStoresDF)'. This method appends the rows of acquiredStoresDF to storesDF, resulting in a new DataFrame that contains the rows of both original DataFrames.

Discussion
newusername

could you please fix the question? It is missing part of it. Though the answer is correct

SaiPavan10Option: E

E is the right choice.