I have a dataframe that contains a column with different submarkets from a city. I need to iterate through that column and check if a value in that row matches any of the entries that could be in the list. that list will then be added as a column to the original dataframe
submarket_list = [ 'South Financial District', 'Financial District', South of Market]
submarket_check = []
for index,row in test_df.iterrows():
for j in submarket_list:
if row['Submarket'] == j:
submarket_check.append("yes")
else:
submarket_check.append("No")
test_df['Submarket Check'] = submarket_check
test_df