I have a pandas data frame (showing values of one of the rows) as below. In the annotation column, I have a list of strings which I want to check in the note_sentence column which contains sentences.
I used the below code to check the existence but it is unable to capture the existence of strings in the sentences.
df_feature_case_notes['Exists'] = df_feature_case_notes.apply(lambda x: 'Yes' if x['annotation'] in x['note_sentence'] else 'No',axis=1)
How can I fix my code?

