Имеют фрейм данных df
, содержащий column (A)
, как показано ниже A
["User mapping missing constantly for random users on product PLA-ZA. Hi , Generally, these results look encouraging. Here's what I see at the moment:- On Sept 12, when you ran this script, exactly the same users were shown as not "in sync" as we see in the most recent output."
"History ------------ *** Audit: MLACAMBR 01/10/2018 18:40:05 GMT ",
"1. find the process ids by doing ps -efl | grep BEMS74397" ,
"kill each of these processes, as follows (for example, if the process ID is 555555):",
"Troubleshoots from the KMCas well as from the sensor where the connections occurred"]
и список Python соответствует
["PLA-ZA","BEMS","MLACAMBR","KMC","OWL",,,,]
Для фрейма данных необходимо добавить новый column B
, соответствующий строкам из списка
новый фрейм данных с соответствующим ключевым словом, добавленный в качестве нового столбца
введите описание изображения здесь
matches= "|".join(f"\\b{i}\\b" for i in matches)
df["B"] = df['text'].str.findall(matches,re.IGNORECASE).str.join("|")
df["B"]