How to get a new column in a data frame Application of the logical operator, if not

Feature1, Feature2, Feature3, Feature4, TARGET

5.1,3.5,1.4,0.2,Iris-setosa
4.9,3.0,1.4,0.2,Iris-setosa
6.4,3.2,4.5,1.5,Iris-versicolor
6.9,3.1,4.9,1.5,Iris-versicolor
6.3,2.5,5.0,1.9,Iris-virginica
6.5,3.0,5.2,2.0,Iris-virginica

how can I work out the target (species) from the relationship of the feature using if else if or logical operator? For example

If feature 1 < 5.2 and feature 2 >3.4 and feature 3 < 1.5 and feature 4 <.3
Then print iris-setosa


Try this: use np.where(cond,if true,if false),

df['new'] = np.where((df['Feature1'] < 5.2) & (df['Feature2'] > 3.4) & (df['Feature3'] < 1.5) & (df['Feature4'] < .3), "iris-setosa", "")