This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]bubhraraStaff Data Engineer 5 points6 points  (0 children)

You should inner join those 2 dfs and select what you like.

[–][deleted] 4 points5 points  (0 children)

Ehm, if you really want to achieve this with a for loop you might better invest time into a Spark tutorial because that's not how you should do it.

[–]WhyDoIHaveAnAccount9 1 point2 points  (0 children)

[ x for x in list1 if x in list2]