Using and statements to create Boolean iterate over rows is ambiguous

21 views Asked by At

I want to determine if a value lies within a range and create a boolean for that.

for index in etData.iterrows():
    if np.logical_and(etData['lr_x'] >= -0.49, etData['lr_x'] <=-0.31):
        etData['3_1']= True

This is the code I got. I keep getting an error: through value of a series is ambiguous.

0

There are 0 answers