Extract country name from text in column to create another column

79
January 22, 2020, at 10:30 PM

I have tried different combinations to extract the country names from a column and create a new column with solely the countries. I can do it for selected rows i.e. df.address[9998] but not for the whole column.

import pycountry
Cntr = []
for country in pycountry.countries:
    for country.name in df.address:
        Cntr.append(country.name)

Any ideas what is going wrong here?

READ ALSO
Problem making Sphere using PyOpenGL and PyQt5 [closed]

Problem making Sphere using PyOpenGL and PyQt5 [closed]

Want to improve this question? Update the question so it's on-topic for Stack Overflow

108
How to convert this jQuery code to plain JavaScript?

How to convert this jQuery code to plain JavaScript?

I'm trying to get the focus method (touch, mouse or keyboard) on links setting a data-attribute

38
How to scroll div continuously on mousedown event?

How to scroll div continuously on mousedown event?

I have two divs and two buttons:

91
Google Invisible ReCaptcha on multiple forms in a same page - PHP

Google Invisible ReCaptcha on multiple forms in a same page - PHP

I am following this Invisible ReCaptcha doc on my php website: http://wwwpinnacleinternet

80