title: pandas HDFStore: sql "GROUP BY" equivalent
body: <p>I am trying to translate the following SQL query to run on a large pandas HDFStore:</p>
  
  <pre><code>SELECT * FROM mytable
  JOIN (
    SELECT col1, col2, col3, max(colN) as maxColN
    FROM mytable
    GROUP BY col1, col2, col3
  ) m
  ON m.col1=mytable.col1 AND m.col2=mytable.col2 AND m.col3=mytable.col3
  WHERE colN=maxColN
  </code></pre>
  
  <p>What would be the best way to implement this? I have indexes on <code>col1</code>, <code>col2</code>, <code>col3</code>.</p>