I have dataframe with the following values
Bird Color
0 Parrot ['Light_Blue','Green','Dark_Blue']
1 Eagle ['Sky_Blue','Black','White', 'Yellow','Gray']
2 Seagull ['White','Jet_Blue','Pink', 'Tan','Brown', 'Purple']
I want to create a column called 'No Blue', where it will only list array elements without the word "Blue" in it.
Like this:
Bird Color No Blue
0 Parrot ['Light_Blue','Green','Dark_Blue'] ['Green']
1 Eagle ['Sky_Blue','Black','White', 'Yellow','Gray'] ['Black', 'White', 'Yellow', 'Gray']
2 Seagull ['White','Jet_Blue','Pink', 'Tan','Brown', 'Purple'] ['White', 'Pink', 'Tan', 'Brown', 'Purple']
This is the closest thing I have to a solution
>>> Eagle = ['Sky_Blue','Black','White', 'Yellow','Gray']
>>> matching = [x for x in Eagle if "Blue" not in x]
>>> matching
['Black', 'White', 'Yellow', 'Gray']
str.extractorstr.replaceetc