擅长:python、mysql、java
<p>使用<a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.astype.html">^{<cd3>}</a>将<code>dtype</code>转换为<code>str</code>:</p>
<pre><code>In [11]:
df['Percent'] = df['Grade'].astype(str) + '%'
df
Out[11]:
Grade Name Percent
0 82 jimmy 82%
1 38 red 38%
2 55 julie 55%
3 19 brad 19%
4 33 oranges 33%
</code></pre>
<p>您所尝试的只是将列转换为<code>Series</code>的字符串版本:</p>
<pre><code>In [12]:
str(df['Grade'])
Out[12]:
'0 82\n1 38\n2 55\n3 19\n4 33\nName: Grade, dtype: int32'
</code></pre>