title: Compare Two Columns For Matching Values And Align Side By Side
body: <p>The data I have has two columns whose values should match. Since, there are too many rows I have to do following:</p>
  
  <ul>
  <li>Load both columns</li>
  <li>Compare <code>A</code> and <code>B</code> to find matching values</li>
  <li>Stack output of column <code>A</code> and <code>B</code> into two new columns, such that matching values are side by side and values that don't match are at the end of each column.</li>
  </ul>
  
  <p>Is there a faster way to do this such that it applies of any type of data (integer, float or character) comparison?</p>
  
  <p><strong>Input Data Table</strong> </p>
  
  <pre><code>A   B
  1   1
  2   3
  3   4
  4   5
  5   6
  6   7
  7   8
  8   9
  9   10
  10  11
  </code></pre>
  
  <p><strong>Output Data Table</strong></p>
  
  <pre><code>C   D
  1   1
  3   3
  4   4
  5   5
  6   6
  7   7
  8   8
  9   9
  10  10
  2   11
  </code></pre>