I'm trying to insert a new column in Python using Pandas based on an "or" condition, but I'm having trouble with the code. Here's what I'm trying to do:
If the column "Regulatory Body" says FDIC, Fed, or Treasury, then I want a new column "Filing" to say "Yes"; otherwise, say "No". This is what I've written. My dataframe is df200.
df200["Filing"] = np.where(df200["Regulatory Body"]=="FDIC","Yes","No")
Is there a way to have an "or" condition in this code to fit the other two variables?
Thanks!