title: pandas row wise comparison and apply condition
body: <p>This is my dataframe:</p>
  <pre class="lang-py prettyprint-override"><code>df = pd.DataFrame(
      {
          &quot;name&quot;: [&quot;bob_x&quot;, &quot;mad&quot;, &quot;jay_x&quot;, &quot;bob_y&quot;, &quot;jay_y&quot;, &quot;joe&quot;],
          &quot;score&quot;: [3, 5, 6, 2, 4, 1],
      }
  )
  </code></pre>
  <p>I want to compare the score of <code>bob_x</code> with 'bob_y<code>, and retain the row with the lowest, and do the same for </code>jay_x<code>and</code>jay_y<code>. No change is required for </code>mad<code>and</code>joe`.</p>