Removing parenthesis from a string in pandas with str.replace
<p>I have a list of countries where some have a space and parenthesis after, for example, <em>&quot;Bolivia (Plurinational State of)&quot;</em>.</p>
<p>Why doesn't my code below work to only keep <em>&quot;Bolivia&quot;</em>?</p>
<pre><code>energy['Country'] = energy['Country'].str.replace(&quot;Bolivia (Plurinational State of)&quot;,&quot;Bolivia&quot;)
</code></pre>