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:
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:
I usually work with r, and the dplyr library seems the right solution, but no success so far. I'm also familiar with python by the way. Anyone that can be of help?
Thanks in advance!