code: def filter_data_frame(self, data_frame, centre=False, keep_cols=['anno']):
                  
          b_f = lambda x: butter_lowpass_filter(x.values, self.sampling_frequency, cutoff=self.cutoff_frequency, order=self.filter_order)
          filtered_data_frame = data_frame.apply(b_f, 0)
          
          # we don't need to filter the time difference
          # filtered_data_frame.td = data_frame.td
          
          logging.debug("filtered whole dataframe!")
          
          # I need to fix this as I am losing some important information
          # one idea would be to look at where the sign changes (first and second peak)
          # and keep that information aswell.
          if centre:
              # de-mean
              filtered_data_frame -= filtered_data_frame.mean()
              
              for col in filtered_data_frame:
                  first_zero_crossing = np.argwhere(filtered_data_frame[col] > 0)[0][0]
                  filtered_data_frame[col][:first_zero_crossing] = 0
          
          # No python3 support :(
          # if {*keep_cols}.issubset(filtered_data_frame.columns):
          for c in keep_cols:
              if c not in filtered_data_frame.columns:
                  return
  
          filtered_data_frame[keep_cols] = data_frame[keep_cols]
          return filtered_data_frame
docs: This method filters a data frame signal as suggested in [1]. First step is to high pass filter the data
              frame using a butter Butterworth digital and analog filter 
              (https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.signal.butter.html). Then the method 
              filter the data frame along one-dimension using a digital filter. 
              (https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.lfilter.html)
  
              :param data_frame: the data frame    
              :param str cutoff_frequency: The path to load data from
              :param str filter_order: format of the file. Default is CloudUPDRS. Set to mpower for mpower data.