У меня есть фрейм данных pandas, как показано ниже: -
Tweets
0 RT @cizzorz: THE CHILLER TRAP *TEMPLE RUN* OBS...
1 Disco Domination receives a change in order to...
2 It's time for the Week 3 #FallSkirmish Trials!...
3 Dance your way to victory in the new Disco Dom...
4 Patch v6.02 is available now with a return fro...
5 Downtime for patch v6.02 has begun. Find out a...
6 ?⛏️... soon
7 Launch into patch v6.02 Wednesday, October 10!...
8 Righteous Fury.\n\nThe Wukong and Dark Vanguar...
9 RT @wbgames: WB Games is happy to bring @Fortn...
У меня также есть список, предположим, как показано ниже: -
my_list = ['Launch', 'Dance', 'Issue']
с командой ниже он отфильтровывает фрейм данных: -
ndata = data[data['Tweets'].str.contains( "|".join(my_list), regex=True)].reset_index(drop=True)
фильтр не работает, если у меня
Working Not Working
Launch 'launch' , 'launch,' , 'Launch,' ,'LAUNCH','@launch'
Ожидаемый вывод должен быть предложением havign любого из нижеприведенных слов
'launch' , 'launch,' , 'Launch,' ,'LAUNCH','@launch'