擅长:python、mysql、java
<p>要以更像熊猫的方式来做这件事,你可能需要做更多这样的事情:</p>
<pre><code>one_phase = df['Phase'] == '1PH'
small = df['kVA'] <= 750
df['Line'][one_phase] = '1PH'
df['Line'][~one_phase & small] = '3PHSM'
df['Line'][~one_phase & ~small] = '3PHLG'
</code></pre>
<p>注意:您没有留下任何可分析的样本数据,因此未对其进行测试</p>