title: Spark select top values in RDD
body: <p>The original dataset is:</p>
  
  <pre><code># (numbersofrating,title,avg_rating)
  newRDD =[(3,'monster',4),(4,'minions 3D',5),....] 
  </code></pre>
  
  <p>I want to select top N avg_ratings in newRDD.I use the following code,it has an error.</p>
  
  <pre><code>selectnewRDD = (newRDD.map(x, key =lambda x: x[2]).sortBy(......))
  
  TypeError: map() takes no keyword arguments
  </code></pre>
  
  <p>The expected data should be:</p>
  
  <pre><code># (numbersofrating,title,avg_rating)
  selectnewRDD =[(4,'minions 3D',5),(3,'monster',4)....] 
  </code></pre>