擅长:python、mysql、java
<p>对<code>split</code>使用嵌套列表理解,通过<code>in</code>使用tes成员身份,并将拆分的值连接回:</p>
<pre><code>L = ['br', 'and']
df['phrase']=[' '.join(x for x in sent.split() if x not in L) for sent in df['phrase']]
print (df)
phrase
0 the quick brown fox
1 jack jill went up the hill
</code></pre>