title: pandas group by a list of group indces
body: <p>Assume I have already got the grouped indices lists of a <code>dataframe</code> and I would like to get the sub dataframes using <code>groupby</code> or other functions. I know I can use <code>isin</code> like <code>[df[df.index.isin(group)] for group in grouplist]</code> to query the dataframe several times but it seems to be very slow. How could I get the groups more efficiently? </p>
  
  <pre><code>grouplist = [[1],[29, 30, 31],[40],[46, 47, 48, 49],[58, 59],[68, 69, 70],[99, 100, 101],[103]]
  </code></pre>