<p>从示例数据帧<code>df</code>开始,如:</p>
<pre><code>a,b
0,0.71
1,0.75
2,0.80
3,0.90
</code></pre>
<p>我将添加一个新列,其指数值为列<code>b</code>。到目前为止,我试着:</p>
<pre><code>df['exp'] = math.exp(df['b'])
</code></pre>
<p>但此方法返回:</p>
<pre><code>"cannot convert the series to {0}".format(str(converter)"
TypeError: cannot convert the series to <type 'float'>
</code></pre>
<p>是否有方法将<code>math</code>函数应用于整个列?</p>