Data Wrangling with Pandas
June 1, 2020
Multi-index column headers
Having multi-index columns restricts what you can do in Pandas. For instance, we can’t use pd.query, and writing functions for pd.apply, pd.groupby becomes complicated. Moving forward I would opt to temporarily join the rows with an appropriate delimiter, and expand when exporting. Or just select one row as header when possible.