title: Why is NaN considered as a float?
body: <p>In <code>pandas</code> when we are trying to cast  a series which contains <code>NaN</code> values to integer with a snippet such as below</p>
  
  <p><code>df.A = df.A.apply(int)</code> , i often see an error message </p>
  
  <pre><code>ValueError: cannot convert float NaN to integer
  </code></pre>
  
  <p>I understand that <code>NaN</code> values can't be converted to integer. But i am curious about the <code>ValueError</code> thrown in this case. it says <strong>float</strong>   NaN can't be converted to integer. </p>
  
  <p>Is there any specific reason why <code>NaN</code> values are treated as float objects? or is this the case of some issue with the error messages displayed? </p>