In order to convert the country-specific ISO2 code to a continental name, try for 5 hours and then post a question because it gets stuck.
First of all, I modified the code that I got through Google as below and succeeded.
However, in the process of using this to obtain continental information using the above iso2_list along with the package called pycountry_converter, it is not successful because it is not easy to use def and for loop syntax together.
The code you want to use is as follows.
Also, the code I tried is as follows.
I feel like all the syntaxs I know thinly have collapsed in the way of using for loop, def, and if phrases, so I'd appreciate it if you could point out how to modify them and which parts I don't know well.python for loops def
When you get confused while coding, it is helpful to code in Korean sometimes.
You see what's going on?
I believe this would have been helpful, so I'll cut it down.
+ Just in case you're curious about where to get
code_content_dict... It's libraries like
pycountry that provide it.
This is a method of converting by adding columns one by one to the pandas data frame.
© 2022 pinfo. All rights reserved.