 <p><code>df["dataset_code"]</code> is a <code>Series</code>, not a <code>DataFrame</code>. Since you want to append one DataFrame to another, you need to change the Series object to a DataFrame object.</p> <pre><code>&gt;&gt;&gt; type(df) &lt;class 'pandas.core.frame.DataFrame'&gt; &gt;&gt;&gt; type(df['dataset_code']) &lt;class 'pandas.core.series.Series'&gt; </code></pre> <p>To make the conversion, do this:</p> <pre><code>df = df["dataset_code"].to_frame() </code></pre>