次のようなtsvファイルがあります。パンダ列の特定の単語を特定する
id ingredients recipe
code1 egg, butter beat eggs. add unsalted butter
code2 tim tam, butter beat tim tam. add butter
code3 coffee, sugar add coffee and sugar and mix
code4 sugar, fresh goat milk beat sugar and milk together
は、私は彼らがingredients
またはrecipe
のいずれかの列に下記の単語が含まれている場合、エントリを削除します。
mylist = ['tim tam', 'unsalted butter', 'fresh goat milk']
私の出力は次のようになります。
id ingredients recipe
code3 coffee, sugar add coffee and sugar and mix
パンダでこれを行う方法はありますか?私を助けてください!
あなたは私たちにあなたがこれまでに行った作業を表示することができますか? – louisfischer