devctrl.data.transforms.derivative#
- derivative(sdata: ndarray[tuple[Any, ...], dtype[_ScalarT]], columns: list[str], n=1, pre_func=None, **apply_kw)[source]#
Calculate the n-th derivative of column(s) <key> numerically. :param n: The derivative to calculate :param pre_func: A function taking and returning a 1d numpy array. If given, it is applied before every derivative.
This may, for example, be useful if the data should be smoothened before taking the derivatives.