Select library column

I have a dataset in which one of the columns contains a library of different 'subcolumns'. For data preparation purposes, I want to extract certain parts of that column and store it into a new column. The data looks like this:

ss of image 1

I'm looking to get a new, third, column that contains a header that says 'animal' and contains rows that say 'dog' and 'cat'. Like this:

ss of image 2

I usually work with , and the library seems the right solution, but no success so far. I'm also familiar with by the way. Anyone that can be of help?

Thanks in advance!