import pandas as pd
idx = pd.MultiIndex(levels=[['a', 'b'], ['c', 'd']], labels=[[0, 0, 1, 1],
    [0, 1, 0, 1]], names=['lvl1', 'lvl2'])
df = pd.DataFrame([1, 2, 3, 4], index=idx, columns=['data'])
Merge on single level of MultiIndex