title: Convert Apache Spark Scala code to Python
body: <p>Can anyone convert this very simple scala code to python?</p>
  
  <pre><code>val words = Array("one", "two", "two", "three", "three", "three")
  val wordPairsRDD = sc.parallelize(words).map(word =&gt; (word, 1))
  
  val wordCountsWithGroup = wordPairsRDD
      .groupByKey()
      .map(t =&gt; (t._1, t._2.sum))
      .collect()
  </code></pre>