I have the following dataframe:
col 0 pre 1 post 2 a 3 b 4 post 5 pre 6 pre
I want to replace all rows in the dat
df[df['col'].apply(lambda x: 'pre' not in x)] = 'nonpre'