I have a dataframe with multiple columns. I want to look at one column and if any of the strings in the column contain @, I want to replace them with another string. How wou
My suggestion:
df['col'] = ['new string' if '@' in x else x for x in df['col']]
not sure which is faster.