Anonymizing data / replacing names
问题 Normally I anonymize my data by using hashlib and using the .apply(hash) function. Now im trying a new approach, imagine I have to following df called 'data': contributor -- amount payed eric -- 10 frank -- 28 john -- 49 frank -- 77 barbara -- 31 Which I want to anonymize by turning the names all into 'person1', 'person2' etc, like this: contributor -- amount payed person1 -- 10 person2 -- 28 person3 -- 49 person2 -- 77 person4 -- 31 So my first though was summarizing the name column so the