title: Pandas: Selecting rows to create new dataframe using the index
body: <p>Simple question. I have a dataframe that looks like this (call if <code>df1</code>):</p>
  
  <pre><code>Country 2016 2017 2018
  USA 1 2 3 
  CAN 4 5 6
  MEX 7 5 6
  ARG 9 3 5 
  GBR 5 8 2
  </code></pre>
  
  <p>I have a variable called <code>countries</code> which looks like this: <code>countries=['USA','MEX','GBR']</code>. How can I make a new dataframe (call it <code>df2</code>) which selects only the rows mentioned in <code>countries</code>?</p>
  
  <p>I can select rows manually, or several of them if they are in a block (say USA to MEX), but I don't know how to do it if the order is random. A loop could do it, (see below) but that only saves the last country in the loop!</p>
  
  <pre><code>for country in countries:
      df2 = df1.loc[country:country,:].copy()
  </code></pre>
  
  <p>PS. I'm sure this is a duplicate! But I've spent a good hour searching for the answer with no success.</p>