Reputation: 578
I'm trying to use a continuous wavelet transform but I keep getting ValueError: Only dim == 1 supported.
My data is a pandas dataframe.
I have tried using the following:
df2 = py.cwt(df, scales=1, wavelet='gaus1')
My results were the
ValueError: only dim == 1
Traceback (most recent call last):
File "<ipython-input-1-4c0398b4c4f3>", line 1, in <module>
runfile('/home/user_1/untitled6.py', wdir='/home/user_1')
File "/usr/lib/python3/dist-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "/usr/lib/python3/dist-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/home/user_1/untitled6.py", line 41, in <module>
df2 = py.cwt(df,scales ,wavelet='gaus1')
File "/home/user_1/.local/lib/python3.6/site-packages/pywt/_cwt.py", line 107, in cwt
raise ValueError("Only dim == 1 supported")
Upvotes: 0
Views: 725
Reputation: 52337
pywt.cwt()
offers the One dimensional Continuous Wavelet Transform. When working with Pandas, you can apply it on a Series, but not on a Dataframe.
Upvotes: 1