Hello I have a seemingly very simple problem but I cannot figure out how to easily resolve it. I have have a dataset where I have 52 different sampling locations and they all have awkward names. As a short example here is a small column with the problem I ran into and what I would like it to read:
ProblemColumn: Ideal Column:
Site1 1
Site1 1
Site1 1
Site2 2
Site2 2
Site3 3
Site3 3
Site3 3
Site4 4
Site5 5
Location1 6
Location1 6
Location2 7
I'm interested in converting each instance of Site1 into the number 1, Site 2 into number 2, etc. Is there a way to easily convert each unique value in this column to a numeric value? Ideally I wouldn't have to manually assign a number to each unique location since that would be 52 lines but that's fine if it's inevitable. I apologize if this is super basic but my class rarely deals with this kind of thing and I haven't been able to figure out an easy way to achieve this.