Explore Courses Blog Tutorials Interview Questions

Explore Tech Questions and Answers

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

0 votes
1 view
by (120 points)
Let's say I have 2 RDDS:

rdd1 = [a, b, c, d]

rdd2 = [[], [a, d], [a, e], [c]]

Now let's say I want to filter the second rdd so that it only contains elements in rdd1. so after filtering it should look like

rdd2 = [[], [a, d], [a], [c]]

Nex. I want to combine them into one list like this

[[a, []], [b, [a, d], [c, [a]], [d, [c]]

How do I do this in Python?

Please log in or register to answer this question.

Browse Categories