擅长:python、mysql、java
<p>您的销售价格中有一个空字符串。如错误所示</p>
<pre><code>ValueError: could not convert string to float: ''
</code></pre>
<p>要修复第一次运行,请执行以下操作:</p>
<pre><code>df['Sale Price'] = df['Sale Price'].where(df['Sale Price'] != '', 0)
</code></pre>
<p>这将用零替换任何空字符串</p>