擅长:python、mysql、java
<p>首先从新映射创建序列:</p>
<pre><code>s = df2.set_index('Nation')['Capital City']
</code></pre>
<p>然后使用<a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.update.html" rel="nofollow noreferrer">^{<cd1>}</a>就地更新您的系列:</p>
^{pr2}$