'Detrend data.
This function operates in-place.
Parameters
order : int
Either 0 or 1, the order of the detrending. 0 is a constant
(DC) detrend, 1 is a linear detrend.
picks : array-like of int | None
If None only MEG, EEG, SEEG, ECoG and fNIRS channels are detrended.
Returns
evoked : instance of Evoked
The detrended evoked object.'

def detrend(self, order=1, picks=None):

    if (picks is None):
        picks = _pick_data_channels(self.info)
    self.data[picks] = detrend(self.data[picks], order, axis=(-1))
    return self
