← Back to the chapter · Previous detail · Next detail →

Technical detail · Edge Data: Sampling and Statistical Compression

Align two sensor rates

# Resample high-frequency data to match low-frequency
vibration_1hz = vibration_100hz.resample('1S').mean()
# Or upsample low-frequency with interpolation
temp_100hz = temp_1hz.resample('10ms').interpolate(method='linear')
# Then merge on aligned timestamps
merged = pd.merge_asof(vibration_1hz, temp_1hz, on='timestamp', tolerance=pd.Timedelta('500ms'))

← Back to the chapter · Previous detail · Next detail →