title: Resample Pandas DataFrame
body: <p>I have this:</p>
  
  <pre><code>                       date   emaslow
  105857  2017-10-24 22:50:00  0.000037
  105858  2017-10-24 22:55:00  0.000037
  105859  2017-10-24 23:00:00  0.000037
  </code></pre>
  
  <p>It is a huge data set, this is only the <code>tail(3)</code> bit and the <code>date</code> and <code>emaslow</code> columns. I am trying to resample this a little bit so I get a smoother plot. But no matter what I do, I get the nasty:</p>
  
  <pre><code>TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but 
  got an instance of 'RangeIndex'
  </code></pre>
  
  <p>I tried to <code>set</code> and <code>reset</code> the index with <code>df.reset_index()</code> and <code>df.set_index('date')</code></p>
  
  <p>But with no luck.</p>
  
  <p>I am trying to get a smoother, version of the red plot. The blue one is wrong and it is just a place holder.</p>
  
  <p><a href="https://i.stack.imgur.com/5zPxM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5zPxM.png" alt="enter image description here"></a></p>