title: How to maintain order when selecting rows in pandas dataframe?
body: <p>I want to select rows in a particular order given in a list. For example</p>
  
  <p>This dataframe </p>
  
  <pre><code>a=[['car',1],['bike',3],['jewel',2],['tv',5],['phone',6]]
  
  df=pd.DataFrame(a,columns=['items','quantity'])
  
  &gt;&gt;&gt; df
     items  quantity
  0    car         1
  1   bike         3
  2  jewel         2
  3     tv         5
  4  phone         6
  </code></pre>
  
  <p>I want to get the rows with this order <code>['tv','car','phone']</code>, that is, first row tv and then car and then phone. I tried this method but it doesn't maintain order </p>
  
  <pre><code>arr=['tv','car','phone']
  
  df.loc[df['items'].isin(arr)]
  
     items  quantity
  0    car         1
  3     tv         5
  4  phone         6
  </code></pre>