Merging Multi-level Index Pandas DataFrames

Foong Min Wong
Apr 12, 2024

While working on an analysis of multi-index Pandas dataframes generated from instrument hardware, I was trying to merge them into one data frame before plotting them in a loop. I checked out pd.concat(), pd.join(), pd.merge(), and none of them worked as expected. In the end, I found a way to merge them by transposing and appending, which all share the same index levels. Here’s an example of the data processing steps:

--

--