I have an example DataFrame below where my sampling frequency = 250 Hz (1 sample every 4 ms):
df =
datetime sample_value
2000-01-01 00:00:00.004 56
2000-01-01 00:00:00.008 58
2000-01-01 00:00:00.012 64
2000-01-01 00:00:00.016 61
I'm trying to resample the values above to achieve a sampling frequency of 1000 Hz and interpolate. Can I do this using df.resample()
and then interpolate.interp1d()
from scipy? If so, how?
Most of the examples I've found do this from months -> days or hours -> min., but I'm not able to get this to work for my use case.
Any help would be greatly appreciated. Thank you!
Example Code
Code
use
asfreq