擅长:python、mysql、java
<p>您可以使用<code>stack()</code>:</p>
<pre class="lang-py prettyprint-override"><code>In [1]: states.stack()
Out[1]:
2007-01-01 00:00 1
01:00 2
2007-01-02 00:00 4
01:00 5
dtype: int64
In [2]: type(states.stack())
Out[2]: pandas.core.series.Series
</code></pre>