Examples
import numpy as np
import pandas as pd
s = pd.Series([2, 3, 4, 5],
index=pd.MultiIndex.from_product([['one', 'two'],
['x', 'y']]))
s
s.unstack(level=-1)
s.unstack(level=0)