I have a data which looks like this:
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
.............
I'm interested in the Pressure mean which is sampled every minute. My goal is to look for periodic frequencies inside the data.
I've tried the following:
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)
But i'm getting "tuple index out of range" errors
Any ideas on how to analyze the fft and plot the matching frequencies against the raw data?
The raw data looks like this:
Thanks!

Pressure? Try printing out thelen(Pressure)Pressureis a Pandas Series, roughly speaking a numpy ndarray and you compute its DFT byPfft = np.fft.fft(Pressure)(no indexing!). — I don't know if this problem is or isn't related to the issue that you showed us.