title: How to remove duplicate values from a RDD[PYSPARK]
body: <p>I have the following table as a RDD:</p>
  
  <pre><code>Key Value
  1    y
  1    y
  1    y
  1    n
  1    n
  2    y
  2    n
  2    n
  </code></pre>
  
  <p>I want to remove all the duplicates from <code>Value</code>.</p>
  
  <p>Output should come like this:</p>
  
  <pre><code>Key Value
  1    y
  1    n
  2    y
  2    n
  </code></pre>
  
  <p>While working in pyspark, output should come as list of key-value pairs like this:</p>
  
  <pre><code>[(u'1',u'n'),(u'2',u'n')]
  </code></pre>
  
  <p>I don't know how to apply <code>for</code> loop here. In a normal Python program it would have been very easy. </p>
  
  <p>I wonder if there is some function in <code>pyspark</code> for the same.</p>