a = pd.DataFrame({'a': np.arange(4), 'b': np.arange(1, 5)})
print(df.apply(lambda x: x - a.ix[x.index, 'a'], axis=1))
print(df.apply(lambda x: x - a.ix[x.index, 'b'], axis=1))
Python Pandas: Using apply() to subtract a value from an array