I have the following dataframe:
pd.DataFrame({
'Code': ['XAW', 'PAK', 'I', 'QP', 'TOPZ', 'XAW', 'APOL'],
'Name': ['George Truck', 'Fred Williams', 'Jessica Weir', 'Tony P.', 'John Truck', 'Liz Moama', 'Emily Truck'],
'Color': ['Blue', 'Green', 'Green', 'Red', 'Pink', 'Blue', 'Pink']
})
Code Name Color
0 XAW George Truck Blue
1 PAK Fred Williams Green
2 I Jessica Weir Green
3 QP Tony P. Red
4 TOPZ John Truck Pink
5 XAW Liz Moama Blue
6 APOL Emily Truck Pink
Given a keyword, such as 'blue', I would like to retrieve the following rows:
0 XAW George Paul Blue
5 XAW Liz Moama Blue
The search can contain multiple keywords, for example, 'truck pink' would return:
4 TOPZ John Truck Pink
6 APOL Emily Truck Pink
Imagine that this dataframe has half a million rows and a few extra columns. Is there a fast way I can query the entire dataframe for specific keywords?