Google News
logo
PySpark - Quiz(MCQ)
Which of the following is a transformation operation that shuffles data in PySpark?
A)
groupByKey()
B)
map()
C)
filter()
D)
reduce()

Correct Answer :   groupByKey()


Explanation : groupByKey() is a transformation operation that shuffles data in PySpark. It groups the values of each key in an RDD and creates a new RDD of (key, value) pairs. Other shuffling operations in PySpark include sortByKey(), reduceByKey(), and aggregateByKey().

Advertisement