Replacing names is not enough
Replacing “Aisha Patel” with “User 8472” is pseudonymisation if a protected list is needed to reconnect the code to her. It hides her name, but not the link to her.
Anonymisation goes further: people should not be identifiable even when the data is combined with other information someone could realistically find.
Other details can reveal someone
A rare mix of age, postcode, and location can reveal someone without a name. Teams may group records or use age ranges. Whether data is legally anonymous depends on realistic identification risk, not a “remove names” script.