Sorry for the ambiguous title...
I have a pre-defined list
list = ['ABC', 'DEF', 'GHI', 'JKL']
I have the following table
Item# Value
1 'DEF-1234'
2 'some_text_ABC'
3 'GHI_1"
4 'Item is: ABC'
5 '7713-23-88'
6 'ABC'
And I'd like to extract the following keys based on that 'Value' column
Item# Value Key
1 'DEF-1234' 'DEF'
2 'some_text_ABC' 'ABC'
3 'GHI_1" 'GHI'
4 'Item is: ABC' 'ABC'
5 '7713-23-88' NA
6 'ABC' 'ABC'
I'm thinking of some sort of elif loop, but I suspect that Pandas has something up its sleeve
Thank you very much in advance