I need to replace every cell in a python dataframe if it contains the string p.
A B C
150 5 5p
10 4 8p
1 20 10
to make it look like
A B C
150 5 None
10 4 None
1 20 10
I tried it with
df.replace(df['C'] == df['C'].str.contains('d'), value =None)
which didnt work, can someone tell me why it didnt?