Google News
logo
PySpark - Quiz(MCQ)
Which of the following is used to aggregate data in PySpark?
A)
aggregate()
B)
reduce()
C)
collect()
D)
groupByKey()

Correct Answer :   aggregate()


Explanation : aggregate() is used to aggregate data in PySpark. It applies a function to each partition of an RDD and then combines the results using another function. Other aggregation operations in PySpark include reduce(), fold(), and combineByKey().

Advertisement