擅长:python、mysql、java
<p>你必须在另一个轴上<code>apply</code>。在</p>
<pre><code>def count_keywords(row):
counter = 0
for e in row['B']:
if e in row['A']:
counter += 1
row['C'] = counter
return row
df2 = df.apply(count_keywords,axis=1)
</code></pre>
<p>给你:</p>
^{pr2}$
<p>那么df2['C']应该给你提到的1,1系列。在</p>