I have a function to apply to this table
F(x) = 1.5*x1 + 2*x2 - 1.5*x3
Where xi, i = 1,2,3, is the column value.
And I have the following table below.
X1 | X2 | X3
------|------|------
20 |15 |12
30 |17 |24
40 |23 |36
The desired output that I would like is the following below, where I apply the function to each row, taking the value in each column and applying it to the function iteratively then receiving value as a sum and another column appended onto the dataframe.
X1 | X2 | X3 |F(X)
------|------|------|------
20 |15 |12 |42
30 |17 |24 |43
40 |23 |36 |52
Is there a way to do this in Python 2.7?