title: Bin pandas dataframe by every X rows
body: <p>I have a simple dataframe which I would like to bin for every 3 rows.</p>
  
  <p>It looks like this:</p>
  
  <pre><code>    col1
  0      2
  1      1
  2      3
  3      1
  4      0
  </code></pre>
  
  <p>and I would like to turn it into this:</p>
  
  <pre><code>    col1
  0      2
  1    0.5
  </code></pre>
  
  <p>I have already posted a similar question <a href="https://stackoverflow.com/questions/20134387/resample-pandas-dataframe-with-bin-size-frequency">here</a> but I have no Idea how to port the solution to my current use case.</p>
  
  <p>Can you help me out?</p>
  
  <p>Many thanks!</p>