MultiIndex.
to_frame
Create a DataFrame with the levels of the MultiIndex as columns.
Column ordering is determined by the DataFrame constructor with data as a dict.
New in version 0.24.0.
Set the index of the returned DataFrame as the original MultiIndex.
The passed names should substitute index level names.
See also
DataFrame