擅长:python、mysql、java
<p>使用熊猫的本地where():</p>
<pre><code>df['result'] = 'neutral'
df['result'] = df['result'].where(
df['AF_SC'] != df['VS_SC'], df['VS_SC']).where(
df['TB_SC'] != df['VS_SC'], df['VS_SC']).where(
df['TB_SC'] != df['AF_SC'], df['AF_SC'])
</code></pre>