title: Create hash value for each row of data with selected columns in dataframe in python pandas
body: <p>I have asked <a href="https://stackoverflow.com/questions/5086794/create-hash-value-for-each-row-of-data-in-dataframe-in-r">similar question</a> in R about creating hash value for each row of data. I know that I can use something like <code>hashlib.md5(b'Hello World').hexdigest()</code> to hash a string, but how about a row in a dataframe?</p>
  
  <h3>update 01</h3>
  
  <p>I have drafted my code as below:</p>
  
  <pre><code>for index, row in course_staff_df.iterrows():
          temp_df.loc[index,'hash'] = hashlib.md5(str(row[['cola','colb']].values)).hexdigest()
  </code></pre>
  
  <p>It seems not very pythonic to me, any better solution?</p>