I have the table below, where the missing values in columns Bird1 and Bird2 must be replaced by the result of the linear equation Y(X) = aX + b, where "a" and "b" are constants.
| Bird1 | Bird2 | Bird3 |
|---|---|---|
| 22 | 33 | X0 |
NaN |
4 | X1 |
| 3 | NaN |
X2 |
| 1 | NaN |
X3 |
The result should be as per the table below. How to implement this code in python?
| Bird1 | Bird2 | Bird3 |
|---|---|---|
| 22 | 33 | X0 |
aX1+b |
4 | X1 |
| 3 | aX2+b |
X2 |
| 1 | aX3+b |
X3 |