title: How to get a pandas index value of a string
body: <p><strong>Background:</strong>
  Searching through a spreadsheet with many thousands of rows.  Just need to get the index value--as an int--to then get the value of other columns in that same row.  I'm just trying to transfer specific values from one spreadsheet (.csv) to an excel sheet.</p>
  
  <p>So, basically the goal is; if column A contains XYZ, give me the value of column B,D,etc...  The breakdown of that though (from my understanding); is to get the index of XYZ, then lookup the value of column B at the index number.  Once I have the raw values of the columns, I can do whatever with it.</p>
  
  <p>It's that first step that I'm stuck at, at the moment.</p>
  
  <p>Version: Python 3.6.7</p>
  
  <hr>
  
  <p>Here's the specific code that I'm having problems with:</p>
  
  <p>570-177736 is the value I'm searching for in a column:</p>
  
  <blockquote>
  <pre><code>&gt;&gt;&gt; parcel_csv.index[570-177736]
  203740
  </code></pre>
  </blockquote>
  
  <p>203740 is the index number, as I understand it.</p>
  
  <p>However, when I use a variable in the index brackets (for loop) I get the same error as what's listed below.  I added the single-quotes because I believe that's how it appears as the value in the variable (it's the same error):</p>
  
  <blockquote>
  <pre><code>&gt;&gt;&gt; parcel_csv.index['570-177736']
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/home/localuser/.local/lib/python3.6/site-packages/pandas/core/indexes/range.py", line 522, in __getitem__
      raise IndexError("only integers, slices (`:`), "
  IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
  </code></pre>
  </blockquote>
  
  <p>Let me know if you need more info.  Thank you!</p>