title: Why does np.nan cast my column into float when I run series.replace
body: <p>I am cleaning up a file to get rid of the invalid phone numbers. I want to replace the invalid phones with a null value. When I replace the invalid values with a blank space it works fine. When I try to replace the invalid value with a np.nan so I can get null values python changes my column type form object to float.
  '''</p>
  
  <pre><code>dfr=df['Mobile']
  
  dfr.replace(0,np.nan,inplace=True,regex=False)
  
  Out[]
  7.864526e+09
  3.055277e+09
  7.868887e+09
  7.035980e+09
  NaN
  9.543056e+09
  Name: Mobile, Length: 167, dtype: float64
  </code></pre>
  
  <p>When 
  I run</p>
  
  <pre><code> dfr.replace(0,'',inplace=True,regex=False)
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>7864525885
  3055276596
  7868887478
  7035980427
  
  Name: Mobile, Length: 167, dtype: object
  </code></pre>
  
  <p>Why does this happen?</p>