I need to add value to string without making "TRC+TRC" cells.
So if it already contains TRC -> add nothing.
How to do it?
for i in range(len(df)):
d = str(df['description'][i]).lower()
if df['segment'][i] == 'shopping':
if any(TRC in d for TRC in TRC):
if (df['landsize'][i] > 9000):
df['class'][i] = (f"{df['class'][i]} + TRC")
continue
and what are other variants to do this thing?
df['class'][i] = (f"{df['class'][i]} + TRC")