title: Converting string to int in Pandas column
body: <p>I have a .csv with <a href="https://drive.google.com/open?id=1b_g03kXxpOPUzZeuJ3P03wGxP2JBkZuP" rel="nofollow noreferrer">US Congress biographical data</a> that I read as a Panda df:</p>
  
  <pre><code>df = pd.read_csv('congress100.csv', delimiter = ';', names = ['Name', 'Position', 'Party', 'State', 'Congress'], header = 0)
  </code></pre>
  
  <p>My dataframe looks like this:</p>
  
  <pre><code>0                   'ACKERMAN, Gary Leonard'        'Representative'    'Democrat'  'NY'  '100(1987-1988)'
  1                  'ADAMS, Brockman (Brock)'               'Senator'    'Democrat'  'WA'  '100(1987-1988)'
  2                   'AKAKA, Daniel Kahikina'        'Representative'    'Democrat'  'HI'  '100(1987-1988)'
  3    'ALEXANDER, William Vollie (Bill), Jr.'        'Representative'    'Democrat'  'AR'  '100(1987-1988)'
  4                  'ANDERSON, Glenn Malcolm'        'Representative'    'Democrat'  'CA'  '100(1987-1988)'
  5                   'ANDREWS, Michael Allen'        'Representative'    'Democrat'  'TX'  '100(1987-1988)'
  6                          'ANNUNZIO, Frank'        'Representative'    'Democrat'  'IL'  '100(1987-1988)'
  7             'ANTHONY, Beryl Franklin, Jr.'        'Representative'    'Democrat'  'AR'  '100(1987-1988)'
  8                  'APPLEGATE, Douglas Earl'        'Representative'    'Democrat'  'OH'  '100(1987-1988)'
  9            'ARCHER, William Reynolds, Jr.'        'Representative'  'Republican'  'TX'  '100(1987-1988)'
  10                    'ARMEY, Richard Keith'        'Representative'  'Republican'  'TX'  '100(1987-1988)'
  </code></pre>
  
  <p>I want to convert the data in the 'Congress' column to an integer. Right now, I am first converting it to a simpler string:</p>
  
  <pre><code>df['Congress'] = df['Congress'].str.replace(r'100\(1987-1988\)', '1987')
  </code></pre>
  
  <p>This is successful. But, I am then trying to convert that simpler string to an integer:</p>
  
  <pre><code>df['Congress'] = df['Congress'].pd.to_numeric(errors='ignore')
  </code></pre>
  
  <p>I am getting an error:</p>
  
  <pre><code>AttributeError: 'Series' object has no attribute 'pd'
  </code></pre>
  
  <p>Please help me resolve this error and simplify my code.</p>