title: Pandas dataframe slice by index
body: <p>I am trying to slice a dataframe with index but it is giving error as 'TypeError: 'Int64Index([1], dtype='int64')' is an invalid key'</p>
  
  <pre><code>data = [['Alex', 10], ['Bob', 12], ['Clarke', 13]]
  df = pd.DataFrame(data, columns=['Name', 'Age'])
  index = df.index[df['Name'] == 'Bob']
  print(index)
  df = df.loc[index:]
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>df = df.loc[index:]
  File "C:\Anaconda\lib\site-packages\pandas\core\indexing.py", line 1500, in __getitem__
  return self._getitem_axis(maybe_callable, axis=axis)
  File "C:\Anaconda\lib\site-packages\pandas\core\indexing.py", line 1867, in _getitem_axis
  return self._get_slice_axis(key, axis=axis)
  File "C:\Anaconda\lib\site-packages\pandas\core\indexing.py", line 1533, in _get_slice_axis
  slice_obj.step, kind=self.name)
  File "C:\Anaconda\lib\site-packages\pandas\core\indexes\base.py", line 4672, in slice_indexer
  kind=kind)
  File "C:\Anaconda\lib\site-packages\pandas\core\indexes\base.py", line 4871, in slice_locs
  start_slice = self.get_slice_bound(start, 'left', kind)
  File "C:\Anaconda\lib\site-packages\pandas\core\indexes\base.py", line 4801, in get_slice_bound
  slc = self._get_loc_only_exact_matches(label)
  File "C:\Anaconda\lib\site-packages\pandas\core\indexes\base.py", line 4771, in _get_loc_only_exact_matches
  return self.get_loc(key)
  File "C:\Anaconda\lib\site-packages\pandas\core\indexes\base.py", line 2656, in get_loc
  return self._engine.get_loc(key)
  File "pandas\_libs\index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\index.pyx", line 110, in pandas._libs.index.IndexEngine.get_loc
  TypeError: 'Int64Index([1], dtype='int64')' is an invalid key
  </code></pre>
  
  <p>Printing the index is giving 'Int64Index([1], dtype='int64')' How can I convert it to int value. </p>
  
  <p>No much documentation is available on <a href="https://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.Int64Index.html" rel="nofollow noreferrer">https://pandas.pydata.org/pandas-docs/version/0.23.4/generated/pandas.Int64Index.html</a></p>