title: How can I remove all non-numeric characters from all the values in a particular column in pandas dataframe?
body: <p>I have a dataframe which looks like this:</p>
  
  <pre><code>     A       B           C
  1   red78   square    big235
  2   green   circle    small123
  3   blue45  triangle  big657
  </code></pre>
  
  <p>I need to be able to remove the non-numeric characters from all the rows in column C so that  my dataframe looks like:</p>
  
  <pre><code>     A       B           C
  1   red78   square    235
  2   green   circle    123
  3   blue45  triangle  657
  </code></pre>
  
  <p>I tried using the following but get the error expected string or buffer:</p>
  
  <pre><code>import re
  dfOutput.imgID = dfOutput.imgID.apply(re.sub('[^0-9]','', dfOutput.imgID), axis = 0)
  </code></pre>
  
  <p>What should I do instead?</p>
  
  <p>Code to create dataframe:</p>
  
  <pre><code>dfObject = pd.DataFrame()
  dfObject.set_value(1, 'A', 'red78')
  dfObject.set_value(1, 'B', 'square')
  dfObject.set_value(1, 'C', 'big235')
  dfObject.set_value(2, 'A', 'green')
  dfObject.set_value(2, 'B', 'circle')
  dfObject.set_value(2, 'C', 'small123')
  dfObject.set_value(3, 'A', 'blue45')
  dfObject.set_value(3, 'B', 'triangle')
  dfObject.set_value(3, 'C', 'big657')
  </code></pre>