I have a data which looks like this
X_STATE STATE_NAME
1 Alabama
2 Alaska
3 Arizona
.
.
9 Connecticut
10 Delaware
11 District of Columbia
The U.S state FIPS codes are in the from 01,02,03,...,09,10,11,...72 and not 1,2,3,...,9,10,11
The X_STATE variable is numeric
I am having some trouble in changing the the state codes from 1,2,3,...,9,10,11 to the correct version which is 01,02,03,...,09,10,11,...72.
My query is, how to make this transformation? Do we need to create some function(s)? I have tried multiple ways but no avail. Your help will be much appreciated.
Thank you