I can't seem to find the right regex for what I need. My data frame contains the following countries:
Switzerland17,
Iran (Islamic Republic of),
China, Hong Kong Special Administrative Region
I would like 17 to be removed from Switzerland and all text within parenthesis to be removed. So far, I only managed to do one or the other. Ps.: "China, Hong Kong Special Administrative Region" should remain the same
My current incomplete code:
Energy['Country'] = Energy['Country'].str.replace("[^a-zA-Z]",'')
Any suggestions?