title: remove duplicates when associated values in other columns are repeated
body: <p>I want to delete repeated values in the column called &quot;employee&quot; when the associated values in two columns called &quot;ID&quot; and &quot; Year&quot; are repeated.
  For example if this is the DataFrame:</p>
  <p><a href="https://i.stack.imgur.com/VbLpK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VbLpK.png" alt="enter image description here" /></a></p>
  <p><strong>This is what i want to get:</strong></p>
  <p><a href="https://i.stack.imgur.com/KVgif.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KVgif.png" alt="enter image description here" /></a></p>
  <p>This is what I have done but it did not work:</p>
  <pre><code>df.loc[((df[&quot;ID&quot;].duplicated()) &amp; (df[&quot;year&quot;].duplicated()) ), [&quot;employee&quot;]] = ''
  </code></pre>
  <p>I found the value of the &quot;employee&quot; was removed from some cells where it was not supposed to be removed.</p>