I'm getting value error from this code, which I want to label True if the 'id' is found in my_array
df['exist'] = df['id'].apply(lambda x: True if df['id'].isin(my_array) else False)
I understood the value error may be caused by using 'and', 'or' in the code instead of '&', '|'. However, I'm not using any of these.