Complete the code to create a new RDD by applying a transformation.
rdd2 = rdd.[1](lambda x: x * 2)
The map transformation applies a function to each element and returns a new RDD.
Complete the code to filter RDD elements greater than 10.
filtered_rdd = rdd.[1](lambda x: x > 10)
The filter transformation keeps only elements that satisfy the condition.
Fix the error in the code to chain transformations correctly.
result = rdd.[1](lambda x: x + 1).[2](lambda x: x * 2)
Both transformations should be map to apply functions element-wise and chain properly.
Fill both blanks to build a pipeline that filters and then maps the RDD.
pipeline = rdd.[1](lambda x: x % 2 == 0).[2](lambda x: x * 10)
First filter keeps even numbers, then map multiplies them by 10.
Fill all three blanks to create a pipeline that filters, maps, and then collects results.
final_result = rdd.[1](lambda x: x > 5).[2](lambda x: x - 1).[3]()
The pipeline filters elements greater than 5, maps by subtracting 1, then collects the results to the driver.