Consider the below code snippet:

def fun(x):

return x.split(",")

rdd=sc.parallelize(["1002,John,20000","1003,harry,7000","1004,lookie,900"])

newrdd=rdd.map(fun) # Line 1

newrdd.first() # Line 2

Predict the correct output.

[1002,John,20000]

(1002,John,20000)

Error will occurr due to Line 1

Error will occurr due to Line 2

Verified Answer
Correct Option - a

To get all Infosys Certified PySpark Professional Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in