title: Using split() function on a pandas dataframe
body: <p>I have the following dataframe:</p>
  
  <p><a href="https://i.stack.imgur.com/NgDRe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NgDRe.png" alt="enter image description here"></a>  </p>
  
  <p>I'm trying to get rid of the percentage signs. In order to do this I decided to apply a function to the Democrat and Republican column and try to split() by the percentage sign. The following code tries to do that:</p>
  
  <pre><code>gallup_2012[['Democrat/Lean Democratic', 'Republican/Lean 
  Republican']].apply(lambda x: x.split('%')[0])
  </code></pre>
  
  <p>However, when I try to do this, I get the following error:</p>
  
  <blockquote>
    <p>("'Series' object has no attribute 'split'", u'occurred at index Democrat/Lean > Democratic')</p>
  </blockquote>
  
  <p>I'm not quite sure why this error occurs, as I can apply other functions to this series. It's just that the split() function doesn't work.</p>
  
  <p>Any help would be appreciated!</p>