def detrend(self, detrend='<STR_LIT>'):
data = signal.detrend(self.value, type=detrend).view(type(self))<EOL>data.__metadata_finalize__(self)<EOL>data._unit = self.unit<EOL>return data<EOL>
Remove the trend from this `TimeSeries`

        This method just wraps :func:`scipy.signal.detrend` to return
        an object of the same type as the input.

        Parameters
        ----------
        detrend : `str`, optional
            the type of detrending.

        Returns
        -------
        detrended : `TimeSeries`
            the detrended input series

        See Also
        --------
        scipy.signal.detrend
            for details on the options for the `detrend` argument, and
            how the operation is done