I have already a set named "bad_outcomes" and a dataframe where a column name is "Outcome".
Using the "Outcome", I want to create a list where the element is 0 if the corresponding row in Outcome is in the set bad_outcomes; otherwise, it's 1.
Then I want to assign it to the variable 'landing_class'.
I have written this one:
landing_class = []
if df['Outcome'].isin(set(bad_outcomes)):
landing_class.append(0)
else:
landing_class.append(1)
It's not working. I have got an error.
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().