Time series can be regarded as a signal, such as sound or electrocardiograms, and thus we can extract features that capture some of the complexity of the signal. Examples of signal complexity include the maximum or mean values, as we discussed in the previous recipes. We can also extract more complex features such as the number of local maxima or minima, or even more complex ones, such as the coefficients of the courier transform.
In this recipe, we will determine the number of local maxima and minima manually using the signal module from SciPy in combination with pandas. Then, we will point you to a Python package that extracts these and other complex signal processing parameters automatically that you can explore and use to expand your toolset.