Filter a list of strings but the filter must appear at a certain place
Append to your regex \w{4}$ (requiring that four word characters occur at end of line) in str.contains call
I have a python dataframe with a column populated with strings of the same length like 0302000C0AABGBG , 0407020B0AAAGAG, 040702040BGAAAC
I want to filter to identify all values that contain 'AA' but it must be at position _________AA ____ i.e. do not include 040702040BGAAAC in results.
How do I achieve that?
Current searches yield str.contains but I can't find how to specify the position of the substring.