title: Apply rolling mean function on data frames with duplicated indices in pandas
body: <p>I have difficulty to use pd.rolling_mean function on the following data frame containing duplicated indices:</p>
  
  <pre><code>               amount
      20140101    3
      20140102    4
      20140103    3
      20140103    5
      20140103    1
      20140104    5
      20140105    6
      20140106    2
      …
  </code></pre>
  
  <p>I need to calculate the 3 day average of 'amount', for example, average from <code>20140101</code> to <code>20140103</code> should be <code>(3+4+3+5+1)/5=3.2</code>, the average of amount from 20140104 to 20140106 should be <code>(5+6+2)/3=4.3</code></p>
  
  <p>does anyone know how to do it? Thank you in advance!</p>