【发布时间】:2021-03-01 03:09:06
【问题描述】:
我有这本从 Wikipedia 上刮下来的字典。该词典包含各大洲及其各自的国家。例如:
theWorld = {'Asia': ['China', 'Malaysia'.. etc], 'Europe': ['Germany', 'Italy' ..etc]}
我正在尝试使用 pandas 制作一个数据框,以将一个国家/地区映射到其大陆。例如:
Country Continent
China Asia
Malaysia Asia
Germany Europe
Ghana Africa
等等等等。
【问题讨论】:
标签: python python-3.x pandas dataframe