擅长:python、mysql、java
<p>那么:</p>
<pre><code>data.stack(0).reset_index().rename(
columns={'level_0': 'Time', 'level_1': 'TC'})
</code></pre>
<p>所以在这种情况下<code>.stack()</code>就是您需要的:<br/>
<a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.stack.html" rel="nofollow noreferrer">https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.stack.html</a></p>