Method chaining solution to drop column level in pandas DataFrame
<p>I am using lot's of method chaining when reshaping and querying data I have in pandas <code>DataFrames</code>. Sometimes additional and unnecessary levels for the in indices (rows) and columns are being created. If so, e.g. on the the index (row-axis) this is easily solved by using <code>DataFrame.reset_index()</code>:</p>

<pre><code>df.query('some query')
   .apply(cool_func)
   .reset_index('unwanted_index_level',drop=True) # &lt;====
   .apply(another_cool_func)
</code></pre>

<p>The <code>reset_index</code> function allows one to continue chain methods and keep working with the <code>DataFrame</code>.</p>

<p>Nevertheless, I never found an equivalent solution for the column_axis. Is there any at all?</p>