The below works
df['notes'] = df['notes'].apply(lambda x: x if 'Issue:' in x else "NO_ISSUE")
however I wanted to ask if I can do this:
df['notes'] = df['notes'].apply(lambda x: x if 'Issue:' or "Root Cause:" in x else "NO_ISSUE")
The below works
df['notes'] = df['notes'].apply(lambda x: x if 'Issue:' in x else "NO_ISSUE")
however I wanted to ask if I can do this:
df['notes'] = df['notes'].apply(lambda x: x if 'Issue:' or "Root Cause:" in x else "NO_ISSUE")
You can do it
df['notes'] = df['notes'].apply(lambda x: x if ('Issue:' in x or "Root Cause:" in x) else "NO_ISSUE")