I have dataframe
weight height
56 167
88 179
42 159
51 162
90 170
And I try to apply some function
def min_error(w0, w1, height, weight):
return np.sum(np.power((height - (w0 + w1*weight))), 2)
(data.apply(lambda row: min_error(60, 0.05, row['Height'], row['Weight']), axis=1))
But it returns
ValueError: ('invalid number of arguments', u'occurred at index 1')
How can I fix that?