Pandas convert string to int : <p>I have a large dataframe with ID numbers:</p>

<pre><code>ID.head()
Out[64]: 
0    4806105017087
1    4806105017087
2    4806105017087
3    4901295030089
4    4901295030089
</code></pre>

<p>These are all strings at the moment.</p>

<p>I want to convert to <code>int</code> without using loops - for this I use <code>ID.astype(int)</code>.</p>

<p>The problem is that some of my lines contain dirty data which cannot be converted to <code>int</code>, for e.g.</p>

<pre><code>ID[154382]
Out[58]: 'CN414149'
</code></pre>

<p>How can I (without using loops) remove these type of occurrences so that I can use <code>astype</code> with peace of mind?</p>
