Considering that you have the dataset, or you could get through pycountry, you can work it either with following methods.
import pycountry
new_df = df['country-code'].apply(lambda x: pycountry.countries.get(alpha_3=x).name if len(x) == 3 else pycountry.countries.get(alpha_2=x).name)
print new_df
This prints:
new_df
0 Afghanistan
1 Belgium
2 Australia
3 Germany
4 India
5 United States
6 United Kingdom
Name: country_code, dtype: object
Now, considering that you have csv for both codes of length 2 and length 3 like this:
df2
code name
0 AF Afghanistan
1 DE Germany
2 US United States
and
df3
code name
0 BEL Belgium
1 AUS Australia
2 IND India
3 GBR United Kingdom
After this you follow these steps:
>>> new_df2 = df.merge(df2, left_on='country_code', right_on='code')
>>> new_df2
amount country_code code name
0 100 AF AF Afghanistan
1 400 DE DE Germany
2 125 US US United States
>>> new_df3 = df.merge(df3, left_on='country_code', right_on='code')
>>> new_df3
amount country_code code name
0 200 BEL BEL Belgium
1 140 AUS AUS Australia
2 225 IND IND India
3 600 GBR GBR United Kingdom
>>> df23 = pd.concat([new_df2, new_df3])
>>> df23.reset_index(inplace=True)
>>> df23.drop('index', inplace=True, axis=1)
>>> df23
amount country_code code name
0 100 AF AF Afghanistan
1 400 DE DE Germany
2 125 US US United States
3 200 BEL BEL Belgium
4 140 AUS AUS Australia
5 225 IND IND India
6 600 GBR GBR United Kingdom