def panel_to_multiindex(panel, filter_observations=False):
    """Convert a panel to a MultiIndex DataFrame with the minor_axis of the
    panel as the columns and the items and major_axis as the MultiIndex (levels
    0 and 1, respectively).

    Parameters
    ----------
    panel : a pandas Panel

    filter_observations : boolean, default False
        Whether to drop (major, minor) pairs without a complete set of
        observations across all the items.
    """
    return (panel.transpose(2, 0, 1)
                 .to_frame(filter_observations=filter_observations))