title: Error 'Not supported for type RangeIndex' when calculating weekly grow rate
body: <p>I have a dataframe MyDf like this</p>
  <pre><code>MyDate      MyData      
  2020-06-02  4588.0
  2020-06-03  4555.5
  2020-06-04  4604.3
  2020-06-05  4634.1
  2020-06-06  4617.8  
  2020-06-07  4598.9  
  2020-06-08  4596.1  
  2020-06-09  4607.0  
  2020-06-10  4601.6  
  2020-06-11  4547.4
  </code></pre>
  <p>I want to calculate the weekly rate of growth of MyData column this way:</p>
  <pre><code>    #'WeeklyRate'='MyData'/pastweek('MyData')
      from pandas.tseries.offsets import Week
      MyDf['WeeklyRate'] = ((MyDf['MyData'] / MyDf['MyData'].shift(1, freq=Week()).reindex(MyDf['MyDate'].index))
                                             .fillna(value=-1)
                                             .astype(float))
      #ToDo:not sure if .astype(float)
  </code></pre>
  <p>But I get the error &quot;Not supported for type RangeIndex&quot; when I run the last line.
  What am I doing wrong?</p>