Hello!

I have a problem: I have a dataset which include Chinese cities, however, they are stored in a string variable. For each city there are several observations. Now, I would like to put a number on each of the cities, so for instance: Beijing =1, Tianjin =2 etc.

Is there an appropriate command in Stata to do that?

Thank you in advance!