title: Error:cannot convert float NaN to integer in pandas
body: <p>I have the dataframe:</p>
  
  <pre><code>   a            b     c      d
  0 nan           Y     nan   nan
  1  1.27838e+06  N      3     96
  2 nan           N      2    nan
  3  284633       Y     nan    44
  </code></pre>
  
  <p>I try to change the data which is non zero to interger type to avoid exponential data(1.27838e+06):</p>
  
  <pre><code>f=lambda x : int(x)
  df['a']=np.where(df['a']==None,np.nan,df['a'].apply(f))
  </code></pre>
  
  <p>But I get error also event thought I wish to change the dtype of not null value, anyone can point out my error? thanks</p>