I have a large dataframe (7200, 132) and each column is a signal. I want to apply a butterworth filter to each signal, however, I'm not sure how to do this in Python.
When I do it in matlab I can apply the filter to the whole array and it will filter the columns independently, however, I'm not getting the same results when I apply the filter to the whole dataframe in Python... so I assume it's not filtering columns independently.
Here is a sample of the code I am using:
# filter fs = 240 #sampling frequency order = 2 fc = 6 cut = fc/0.802 adj_fc = cut/(fs/2) b, a = signal.butter(order, adj_fc,'low') data_filt = signal.filtfilt(b, a, raw)
Since I have so many signals (132) I want to filter them all at once and avoid having to call individual columns.