title: How to delete duplicates, but keep the first instance and a blank cell for the duplicates in Pandas?
body: <p>I have a pandas DataFrame, and I'm doing a groupby(['target']).count(). This works fine. However, one of the things I want, for each group, is the number of unique elements in the ID column. </p>
  
  <p>What I'd like to do is, for the ID column, null out all but the first copy of any ID value (IDs are unique to groups, so I don't have to worry about that issue). Then, the groupby().count() will give me the number of unique IDs in each group... But I'm not sure how to do that.</p>