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]))
Filter based on another RDD in Spark