How to generate a hash for each row of rdd? (PYSPARK)
<p>As specified in the question, I'm trying to generate an hash for each row of RDD. For my purpose I cannot use <code>zipWithUniqueId()</code> method, I need one hash of all the columns, for each Row of the RDD.</p>

<pre><code>for row in DataFrame.collect():
    return hashlib.sha1(str(row))
</code></pre>

<p>I know that is the worst way,iterating into rdd, but I'm beginner with pyspark. However the problems is that: I obtain the same hash for each row. I tried to use strong collision resistant  hash function but it is too slow. 
Is there some way to solve the problem?
Thanks in advance :)</p>