title: hash code generation in pyspark
body: <p>I am trying to generate hashcode for each row in my dataframe and need to append the hash code as a  new column "pitid" to dataframe.</p>
  
  <p>i have tried below code but getting error</p>
  
  <pre><code>h=hashlib.md5(c)
  </code></pre>
  
  <p>here c is a dataframe.</p>
  
  <p>error</p>
  
  <pre><code>TypeError: object supporting the buffer API required
  </code></pre>