from pandas import DataFrame, MultiIndex
columns = [('bar', 'one'), ('bar', 'three'), ('flux', 'six'), ('flux', 'three')
    ]
data = [[0.627915, 0.507184, 0.690787, 1.166318], [0.927342, 0.788232, 
    1.776677, -0.512259], [1.0, 1.0, 1.0, 0.0]]
index = MultiIndex.from_tuples(columns, names=['A', 'B'])
df = DataFrame(data, index=['x', 'y', 'z'], columns=index)
sub = df['bar']['one'] - df['flux']['six']
print(sub)
df['new', 'col'] = sub
print(df)
Pandas eval with multi-index dataframes