title: Pandas Series.apply() not working as expected
body: <p>I am trying to apply a function to check if the strings stored in a series are numbers and if so turn them into None, if not do nothing. The Series is as follows:</p>
  
  <pre><code>0 'EUR'
  1 '327'
  2 'None'
  3 'USD'
  </code></pre>
  
  <p>The functions to check if entries are a number represented as a string:</p>
  
  <pre><code>def is_number(s):
      try:
          float(s)
          return True
      except (TypeError,ValueError):
          pass
  
      try:
          import unicodedata
          unicodedata.numeric(s)
          return True
      except (TypeError, ValueError):
          pass
  
      return False
  
  
  def num_to_none(target):
      if is_number(target):
          target = None
  </code></pre>
  
  <p>I call the function like so:</p>
  
  <pre><code>result = mySeries.apply(num_to_none)
  </code></pre>
  
  <p>But I get the following result for res:</p>
  
  <pre><code>    0 'None'
      1 'None'
      2 'None'
      3 'None'
  </code></pre>
  
  <p>The desired result is:</p>
  
  <pre><code>0 'EUR'
  1 'None'
  2 'None'
  3 'USD'
  </code></pre>
  
  <p>I am currently just playing around with this in a test environment with a small dataframe (10000 rows, 70 columns) but I hope to apply it to a much larger dataframe if I can get it working so efficiency advice is also welcome. Thanks in advance.</p>