title: Removing the duplicate row on the basis for certain column value(giving high priority to one column value than other)
body: <p>So I am stuck where I am not able to exactly frame my question as well as come up with a solution.
  Describing the problem below</p>
  <p>I have a data frame with two-column and I want to remove the row with a duplicate value based on the value of col1</p>
  <pre><code>col1 | col2
  A       1
  A       1    
  B       1
  A       2
  B       3
  A       4
  B       4
  
  Result
   
  col1 | col2
  A       1
  A       1
  A       2
  B       3
  A       4
  </code></pre>
  <p>So I want to remove the duplicate column with the condition that if there is a second occurrence of a value in col2 then I will give priority where the col1 value is 'A' and will the second occurrence where the col1 value is 'B'.
  I am really confused about how to implement this condition in python.
  And will be really grateful if someone can rephrase the question as well as the headline in simpler way</p>