擅长:python、mysql、java
<p>有一个特殊的方法-<a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.to_frame.html" rel="nofollow">^{<cd1>}</a></p>
<pre><code>In [2]: df = pd.DataFrame({'a': range(4)})
In [3]: df.a
Out[3]:
0 0
1 1
2 2
3 3
Name: a, dtype: int64
In [4]: df.a.to_frame()
Out[4]:
a
0 0
1 1
2 2
3 3
</code></pre>