title: Get the first row of each group of unique values in another column
body: <p>I want to extract from a dataframe only the first row of each value other than one of the columns (pandas) for example:</p>
  <pre><code>df
     col_A col_B
  0      1     x
  1      2    xx
  2      3    xx
  3      4     y
  4      5     y
  </code></pre>
  <p>to</p>
  <pre><code>df1
    col_A col_B
  0      1     x
  1      2    xx
  2      4     y
  </code></pre>