Filter ECG signal with Wavelet and Python I have to filter the signal of an ECG with the wavelet method with Python. The data is in a txt file. I can create my dataframe with pandas, display that with seaborn, but can not find a way to apply the filter.

The wavelet method is imposed. I do not really know how to do it.

First I tried to understand the mathematical formula to transcribe it into a python algorithm: it's clearly beyond my abilities and my knowledge (and filling this gap would take me months, even years)

I also tried using the python pywavelets library.

The problem is that I do not know what to do with cA and cD :

cA, cD = pywt.dwt([1, 2, 3, 4], 'db1')


My research on google (in English and French) directs me towards papers of scientific research which are also outside my capacities of comprehension.
I will try to answer the question after working on this school project. 

First, why filter an ECG using wavelets? I had a raw signal, full of noise. The filtering of the signal using the wavelet method makes it possible to capture spatial and temporal information very important for an unusual detection.

Here is a tutorial that inspired me, it perfectly describes the role of coefficients:: https://medium.com/@andrewtan_36013/electrocardiograms-qrs-detection-using-wavelet-analysis-a1070505efee