【发布时间】:2016-09-26 15:02:17
【问题描述】:
我有两个数据框:灾难,CountryInfo 灾难有一个国家代码列,其中有一些空值,例如:
灾难:
1.**Country** - **Country_code**
2.India - Null
3.Afghanistan (the) - AFD
4.India - IND
5.United States of America - Null
国家信息:
0.**CountryName** - **ISO**
1.India - IND
2.Afganistan - AFD
3.United States - US
预期结果
Country Country_code
0 India IND
1 Afghanistan AFD
2 India IND
3 United States US
我需要参考国家名称的子字符串填写国家代码。有人可以为此提出解决方案吗?
【问题讨论】:
标签: python python-2.7 pandas