擅长:python、mysql、java
<p>首先将非数值(如空字符串)转换为<code>NaN</code>s,然后如果可以使用0.24+,则将列转换为<a href="http://pandas.pydata.org/pandas-docs/stable/user_guide/integer_na.html" rel="nofollow noreferrer">integers</a>:</p>
<pre><code>data.word_id = pd.to_numeric(data.word_id, errors='coerce').astype('Int64')
</code></pre>