title: Python Pandas resampling data values at regular interval without averaging
body: <p>I have the following data file:</p>
  <pre>
  time,value
  10:23:10.001103,29.3
  10:23:10.002117,29.4
  10:23:10.005137,29.7
  10:23:10.006203,29.5
  10:23:10.007253,29.6
  10:23:10.008313,30.2
  10:23:10.020323,30.4
  10:23:10.030403,30.1
  10:23:10.040404,30.2
  10:23:10.050503,30.8
  10:23:10.060504,30.7
  10:23:10.060603,30.9
  10:23:10.060703,31.4
  10:23:10.060801,31.1
  10:23:10.060821,31.2
  10:23:10.060921,32.3
  </pre>
  <p>And I want to resample the data every 5 milliseconds to obtain the following output:</p>
  <pre>
  time
  10:23:10.001103    29.3
  10:23:10.006103    29.7
  10:23:10.011103    30.2
  10:23:10.016103    30.2
  10:23:10.021103    30.4
  10:23:10.026103    30.4
  10:23:10.031103    30.1
  10:23:10.036103    30.1
  10:23:10.041103    30.2
  10:23:10.046103    30.2
  10:23:10.051103    30.8
  10:23:10.056103    30.8
  10:23:10.061103    32.3
  </pre>
  <p>How do I achieve that?  Basically I want to get the latest seen value on a regular interval.  I tried to use the resample method on the pandas dataframe column but somehow it is averaging all the values within each 5-millisecond bucket.  The code below shows what I was trying to do:</p>
  <pre><code>import pandas as pd
  
  df = pd.read_csv('data2.csv')
  df['time'] = pd.to_timedelta(df['time'], 'ms')
  df2 = df.set_index(df['time'])['value'].resample('5ms').ffill()
  print(df2)
  </code></pre>