There are several countries with numbers and/or parenthesis in my list. How I remove these?
e.g.
\'Bolivia (Plurinational State of)\' should be \'Bolivi
Run just:
df.Country.replace(r'\d+|\s*\([^)]*\)', '', regex=True, inplace=True)
Assuming that the initial content of your DataFrame is:
Country
0 Bolivia (Plurinational State of)
1 Switzerland17
2 United Kingdom
after the above replace you will have:
Country
0 Bolivia
1 Switzerland
2 United Kingdom
The above pattern contains:
)
(between brackets no quotation is
needed),