For example I have the following DataFrame:
| A header | header. 1 | header. 2 | header. 3 |
|---|---|---|---|
| First | 111 | 121 | 323 |
| Second | 222 | 212 | 232 |
I want my new column to be based on the following if condition: if (value in df.header1 > than 0, then add 2) and (value in df.header2 is between 2 and 3, then add 5) and (value in df.header3 and < 400, then add 11)
so my new df would look like this:
| A header | header. 1 | header. 2 | header. 3 | condition_head |
|---|---|---|---|---|
| First | 111 | 121 | 323 | 13 |
| Second | 222 | 212 | 232 | 12 |
df['condition_head']?