title: Python: Random selection per group
body: <p>Say that I have a dataframe that looks like:</p>
  
  <pre><code>Name Group_Id
  AAA  1
  ABC  1
  CCC  2
  XYZ  2
  DEF  3 
  YYH  3
  </code></pre>
  
  <p>How could I randomly select one (or more) row for each <code>Group_Id</code>? Say that I want one random draw per <code>Group_Id</code>, I would get:</p>
  
  <pre><code>Name Group_Id
  AAA  1
  XYZ  2
  DEF  3
  </code></pre>