title: pandas group by product instead of sum or count
body: <p>In python pandas, I want to group a dataframe by column and then take the product of the rows for each ID. Sum and count functions exist, but a product? </p>
  
  <pre><code>df2 = pd.DataFrame({'X' : ['B', 'B', 'A', 'A'], 'Y' : [1, 2, 3, 4]})
  
  print(df2.groupby(['X']).sum())
     Y
  X   
  A  7
  B  3
  
  print(df2.groupby(['X']).count())
     Y
  X   
  A  2
  B  2
  </code></pre>
  
  <p>How can I take the product of the items instead of the sum or count?</p>
  
  <pre><code>print(df2.groupby(['X']).product())
     Y
  X   
  A  12
  B  2
  </code></pre>