Hi, I have a RDD of many items.
Each item has a key and its value is a list of elements. I want to unpack the elements of the item so that I can create a new RDD with each of its item being the original key and one single element. I tried doing RDD.flatmap(lambda line: [ (line[0], v) for v in line[1]]) but it throws an error saying "AttributeError: 'PipelinedRDD' object has no attribute 'flatmap" Can someone tell me the right way to unpack the values to different items in the new RDD? Thank you! With Regards, Abhishek S