擅长:python、mysql、java
<p>在队列中:</p>
<pre><code>df = pd.concat([df.reset_index(drop=True), pd.DataFrame({'type':'teine', 'id':5}, index=[0])], sort=True)
</code></pre>
<p>无需重置concat(<code>df.reset_index(drop=True)</code>)中的索引。但是你必须在concat之后重置索引以避免你的错误。下面是它的样子:</p>
<pre><code>df = pd.concat([df, pd.DataFrame({'type':'teine', 'id':5}, index=[0])], sort=True).reset_index(drop=True)
</code></pre>