pydata/pandas — pull request #5417 by TomAugspurger (2013-11-02 19:37:15+00:00)
Title: BUG: Panel.to_frame() with MultiIndex major axis

Closes #5402 WIP for now.

So this is a hack to get things "working".

I mainly just wanted to ask if there was a better way to get the levels and labels to the MultiIndex constructor.
Don't spend long thinking about it (this is my PR after all), but if you know of a quick way off the top of your head, I'd be interested.
I essentially need to

1. flatten the MultiIndex from major axis (levels and labels)
2. combine that flattened index with the minor axis (levels and labels)

Step 2 could be complicated by `minor_axis` being a MultiIndex also, I should be able to refactor this pretty easily to handle that. I think my was is making several copies of each index, and I'm not sure that they're all necessary.