I have a pandas data frame named country_codes:
>>> country_codes.head(3)
COUNTRY FIPS ISO2 ISO3
0 Afghanistan AF AF AFG
1 Albania AL AL ALB
2 Algeria AG DZ DZA
given a particular fips code:
>>> fips = 'RS'
I select the country name corresponding to that fips code:
>>> country = country_codes[country_codes['FIPS']==fips]['COUNTRY']
and print it:
>>> print(country)
201 Russia
Name: COUNTRY, dtype: object
I want to use that country name in the title of a matplotlib plot. I want the country name only. I do not want the index number or the line that says Name: COUNTRY, dtype: object. How do I get the name only?