title: Grouping data in pandas by rows
body: <p>I have data with this structure:</p>
  <pre><code>id   month   val   
  1    0        4
  2    0        4
  3    0        5
  1    1        3
  2    1        7
  3    1        9
  1    2        12
  2    2        1
  3    2        5
  1    3        10
  2    3        4
  3    3        7
  ...
  </code></pre>
  <p>I want to get mean val for each id, grouped by two months. Expected result:</p>
  <pre><code>id   two_months    val   
  1       0          3.5
  2       0          5.5
  3       0          7
  1       1          11
  2       1          2.5
  3       1          6
  </code></pre>
  <p>What's the simplest way to do it using Pandas?</p>