擅长:python、mysql、java
<p>我能想到的最糟糕的解决方案是使用<code>apply</code>:</p>
<pre><code>g = lambda x: (set(to_delete) - df[x].apply(set)).str.len()==len(to_delete)
res = df[g('C') & g('D') & g('E')]
</code></pre>
<p><strong>df(输入):</strong></p>
<pre><code> A B C D E
0 string1 string4 [string7, string10] [string11, string12] [string15]
1 string2 string5 [string8] [string13] [string16]
2 string3 string6 [string9] [string14] [string17]
</code></pre>
<p><strong>res:</strong></p>
<pre><code> A B C D E
1 string2 string5 [string8] [string13] [string16]
</code></pre>