employee = [['Raffery', 31], ['Jones', 33], ['Heisenberg', 33], ['Robinson',
    34], ['Smith', 34]]
department = [31, 33]
employee = sc.parallelize(employee).map(lambda e: (e[1], e[0]))
department = sc.parallelize(department).map(lambda d: (d, 0))
employee.join(department).map(lambda e: (e[1][0], e[0])).collect()
Фильтр на основе другого RDD в Spark