Anonymizing a List of Values in Python
<p>Assume you have a data set as something like a CSV file that contains mildly sensitive information, like who passed a note to whom in a 12 Grade English class. While it's not a crisis if this data got out, it would be nice to strip out the identifying information so the data could be made public, shared with collaborators, etc. The data looks something like this:</p>

<p>Giver, Recipient:</p>

<blockquote>
  <p>Anna,Joe<br>Anna,Mark<br>Mark,Mindy<br>Mindy,Joe<Br></p>
</blockquote>

<p>How would you process through this list, assign each name a unique but arbitrary identifier, then strip out the names and replace them with said identifier in Python such that you end up with something like:</p>

<blockquote>
  <p>1,2<br>1,3<br>
  3,4<br>4,2</p>
</blockquote>
