擅长:python、mysql、java
<p>这里有一个稍微不同的方法:</p>
<pre><code>In [89]: df.replace(r'[^\d\.]+', '', regex=True).apply(pd.to_numeric, errors='coerce')
Out[89]:
column1 column2 column3 column4
0 6546.0 54325432.0 443326 32000.0
1 4554.0 432885.0 88974 77332.0
2 NaN NaN 5332 NaN
</code></pre>