Accessing individual element of a tuple on in RDD
<p>Can we  access individual element of a tuple in RDD in pyspark? In PIG we use $0,$1 etc ... So something similar do we have in pySpark.
If the tuple have 10 elements, how to get 5th and 7th element ? Which function I should use. How to retrieve only needed elements.</p>

<p>Is this what you want?</p>

<pre><code>rdd57 = rdd.map(lambda x: (x[5], x[7]))
</code></pre>

python apache-spark pyspark