So I am quite a novice to pandas timeseries but I think I need it for some applications.
I have a dataset of an voltage recording which was sampled at a rate of 2500Hz for an hour it needs to be downsampled to 1500hz.
How can I A) create a datetime index/object for this data and B) downsample it to 1500Hz?
EDIT (here is an example):
original_hz = 1/2500 # 2500 hz
downsample_to_hz = 1/1500 # 1500 hz
# 1 second time index at the two sampling frequencies
time_2500hz = np.arange(0, 1, original_hz)
time_1500hz = np.arange(0, 1, downsample_to_hz)
# example sine wave of recording at 2500hz
amplitude = np.sin(time)
How do I downsample and interpolate amplitude so it lines up with the time index from sampling at 1500hz?
I would like to use pandas timeseries (https://pandas.pydata.org/docs/user_guide/timeseries.html) for this but examples in numpy will also be useful.