I want to only keep rows where the last two letters (the state abbreviation) in column 1 differ from the last two letters in column 3
countyname fipscounty neighborname fipsneighbor
1 Archuleta County, CO 8007 Rio Grande County, CO 8105
2 Archuleta County, CO 8007 Rio Arriba County, NM 35039
3 Archuleta County, CO 8007 San Juan County, NM 35045
In row 1, both counties are in Colorado. In rows 2 and 3, the first county is in CO, and the second county is in NM. I only want to keep rows 2 and 3 so that it looks like this:
countyname fipscounty neighborname fipsneighbor
2 Archuleta County, CO 8007 Rio Arriba County, NM 35039
3 Archuleta County, CO 8007 San Juan County, NM 35045
How can I do this?