title: Checking if row items of two columns in a pandas dataframe are the same
body: <p>Given a dataframe <code>C</code> with columns <code>time</code> and <code>session</code> I want to check if the row item in each column matches and then do some operation if true. I'm wondering if there is a vectorized solution to this, currently this is what I'm doing:</p>
  
  <pre><code>for i in range(len(C['time'])):
      if C['time'][i] == C['session'][i]:
          # do something
  </code></pre>