dataset = [('1', 'y'), ('1', 'y'), ('1', 'y'), ('1', 'n'), ('1',
    'n'), ('2', 'y'), ('2', 'n'), ('2', 'n')]
allTuplesRdd = sc.parallelize(dataset, 4)
How to remove duplicate values from a RDD[PYSPARK]