I am working with geographical data, and have a string column in my data which lists a state name, followed by a comma, followed by a county name. How can I eliminate everything before the comma?
So this:
Obs county
1 wisconsin, waukesha
2 oklahoma, tulsa
3 alabama, shelby
4 virginia, montgomery
Should become this:
Obs county newcounty
1 wisconsin, waukesha waukesha
2 oklahoma, tulsa tulsa
3 alabama, shelby shelby
4 virginia, montgomery montgomery
I understand similar questions to this one have been asked in the past, but all the questions on stack have been asking to delete everything after the comma as opposed to before.