I'm having a problem in replacing my data. I have a large dataset. lets say I have 15 attributes, the 15th attributes is Label. I want to change if the data contains botnet, it will change the whole data into "1". for example the data botnet are here or we are looking for botnet, both data will replace to "1"
I've already try using replace
x = "botnet is here and im looking for botnet"
tags = ['botnet']
for tag in tags:
x = x.replace(tag,'')
print(x)
This code only replce word "botnet" But what I want is if the data contain botnet it will change the whole sentences to "1"