Suppose I have a pandas dataframe like this:
Word Ratings
0 TLYSFFPK 1
1 SVLENFVGR 2
2 SVFNHAIRK 3
3 KAGEVFIHK 4
How can I use regex in pandas to filter out the rows that have the word that match the following regex pattern but keep the dataframe formatting? The regex pattern is: \b.[VIFY][MLFYIA]\w+[LIYVF].[KR]\b
Expected output:
Word Ratings
1 SVLENFVGR 2
2 SVFNHAIRK 3