I am attempting to master the art of telling python how to partially match values.
Here's the scoop. correct_list is the 'correct' data frame, while list_to_be_audited_partial_matches_ok is the data frame I'd like to ensure is correct. The issue presented here, though, is tricky: The value in list_to_be_audited_partial_matches_ok may or may not be an exact match to the corresponding value in the correct_list, if it's in there at all.
The value in list_to_be_audited_partial_matches_ok may have some sort of extension to the part within the correct_list; the extension could be signaled by a ':' or a "-", for instance.
Here are a few examples of what I need to consider a 'partial match:'
correct_list = {'Item': ["ABCDEF", "FEDCBA", "AA-BB-CCCC", "ABCDEFGH-IJK"]}
correct_list = pd.DataFrame(df1)
correct_list
list_to_be_audited_partial_matches_ok = {'Item': ["ABCDEF", "FEDCBA:XA", "AA-BB-CCCC-01", "AA-BB-CCCC-21:ABC", "ABCDEFGH-IJK-1X"]}
list_to_be_audited_partial_matches_ok = pd.DataFrame(df2)
list_to_be_audited_partial_matches_ok
Here is a picture that color codes the partial matches:
Last bit of request I have is to have a count of all the partial matches listed.
Any ideas on how to partially match these values? Perhaps a new column that displays 'True/False' depending on if there is a partial match or not?
Why wouldn't this work?

