I would like to create a new column with a numerical value assigned based on whether pet1 contains the word 'cat' or the word 'dog'
pet1
0 dog
1 dog;cat;rabbit
2 cat;dog
3 manbearpig
4 hippo
I would like the end result to be as follows:
pet1 points
0 dog 5
1 dog;cat;rabbit 5
2 cat;dog 5
3 manbearpig 0
4 hippo 0
How do I do this?