'The truth value of a Series is ambiguous if statement in for loop in a function [duplicate]
Why I constantly getting error:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
I tried a couple of things including bitwise operator. Snippet of the error section of the code below
for i in range(len(df_list)):
df_list[i] = df_list[i].lower()
for item in df.index:
d = df['StreetName'][item]
if(d in df_list):
#if d in df_list or d in df_list2 :
df.loc[item,'Clean_status_j'] = 'True'
df.loc[item,'Clean_status'] = 'True'
if (d in df_list2):
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
