Is there a reset_index
equivalent for the column headings? In other words, if the column names are an MultiIndex
, how would I drop one of the levels?
Answer to the second question:
df.columns = df.columns.droplevel(level)
First question is as @AndyHayden points out not that straight forward. It only would make sense if your columns names are of the same type as your column values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With