title: Convert string "nan" to numpy NaN in pandas Dataframe that contains Strings
body: <p>I am reading a file into a dataframe and I see many of my columns contain "nan" strings. Wherever appropriate I have used, </p>
  
  <pre><code>data[['price','age']].apply(pd.to_numeric, errors='coerce')
  </code></pre>
  
  <p>But there are other columns that contain "string" values.</p>
  
  <p>I tried the following, but it did not work. </p>
  
  <pre><code>data['address'].replace('nan', '')
  </code></pre>
  
  <p>How can I convert "nan" values in columns that containg Strings to NaN or empty string or N/A . Basically some value which will be convenient for me to check if a  value is present or not.</p>
  
  <p>Edit: Including minimal verifiable code</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  dict = {'col-a': ['value-a', 'nan', 'nan'],
          'col-b': ['34', '35', '36'],
          'col-c': ['24', '25', '26']}
  
  df = pd.DataFrame(dict)
  print(df,"\n")
  df[['col-b','col-c']] = df[['col-b','col-c']].apply(pd.to_numeric, errors='coerce')
  # does not work
  df.replace('nan','')
  # does not work
  df.replace('nan',np.nan)
  print(df,"\n")
  </code></pre>