I have the problem that I got a huge source data file which is showing text for all variable values instead of numerical IDs. So for example, I would like to have the variable gender coded as 1 and 2 instead of "female" and "male" written out. And equally the same for 200 other variables of which some have up to hundreds of distinct variable values.
Therefore, doing this manually is not really an option here.
Could anybody please point me to a solution or hint within R, SPSS or Python how I can assign numerical IDs to each distinct variable value?
I thought this would be a problem other people face more commonly as well, but I have found nothing of this kind at all.
Thank you for any help!