數據分析我有一個data它看起來像這樣:的Python:使用FFT
YYYY-MO-DD HH-MI-SS_SSS, ATMOSPHERIC PRESSURE (hPa) mean, ATMOSPHERIC PRESSURE (hPa) std
2016-04-20 00:00:00,1006.0515000000001,0.029159119281803602
2016-04-20 00:01:00,1006.039666666667,0.03565211699642609
2016-04-20 00:02:00,1006.0148333333334,0.036891580347842706
2016-04-20 00:03:00,1006.0058333333335,0.03351152934243721
2016-04-20 00:04:00,1005.9714999999999,0.03155973620213212
2016-04-20 00:05:00,1005.955666666667,0.027207094455343653
.............
我感興趣的壓力意味着其採樣的每一分鐘。 我的目標是在數據中查找週期性頻率。
我已經試過如下:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.fftpack import fft
df3 = pd.read_csv('Pressure - Dates by Minute.csv', sep=",", skiprows=0)
Pressure = df3['ATMOSPHERIC PRESSURE (hPa) mean']
frate = 1/60
Pfft = np.fft.fft(Pressure[0])
freqs = fft.fftfreq(len(Pfft), 1/frate)
但我發現了「元組索引超出範圍」錯誤
如何分析FFT和暗算的匹配頻率的任何想法原始數據?
的原始數據是這樣的:
謝謝!
您是否驗證過數據在'壓力'中?嘗試打印出'len(壓力)' –
是的,我做了,我假設它是28171 – ValientProcess
,但是你給最後一行給出了錯誤嗎? –