title: select multiple rows by index in pandas if it is in a list
body: <p>Similar to <a href="https://stackoverflow.com/questions/38828331/select-multiple-sections-of-rows-by-index-in-pandas">Select multiple sections of rows by index in pandas</a>, I have large dataframe, and there are a few indexes I am interested in viewing.</p>
  
  <p>I have:</p>
  
  <pre><code>import pandas as pd 
  df = pd.DataFrame({'A':[0,1,2,3,4,5,6,7,8,9],'B':['a','b','c','d','e','f','g','h','i','j']},
                    index=range(10,20,))
  </code></pre>
  
  <p>and there are few indexes I want to see, <code>list=[12,15,10,14]</code></p>
  
  <p>so that I end up with:</p>
  
  <pre><code>    A  B
  12  2  c
  15  5  f
  10  0  a
  14  4  e
  </code></pre>
  
  <p>is there a command so that I can go:</p>
  
  <pre><code>df.iloc[[index isin list]]
  </code></pre>
  
  <p>as the value list is made from an earlier piece of code.</p>
  
  <p>I tried:</p>
  
  <pre><code>df.loc[[ix]]
  </code></pre>
  
  <p>where <code>ix=dm.iloc[250].sort_values()[:10].index</code> and is <code>Int64Index([250, 1109, 427, 513, 678, 18, 697, 1075, 533, 739], dtype='int64')</code></p>
  
  <p>to no avail.</p>
  
  <p>suggestions welcomed!</p>