code: def resample_signal(self, data_frame):
          
          df_resampled = data_frame.resample(str(1 / self.sampling_frequency) + 'S').mean()
  
          f = interpolate.interp1d(data_frame.td, data_frame.mag_sum_acc)
          new_timestamp = np.arange(data_frame.td[0], data_frame.td[-1], 1.0 / self.sampling_frequency)
          df_resampled.mag_sum_acc = f(new_timestamp)
  
          logging.debug("resample signal")
          return df_resampled.interpolate(method='linear')
docs: Convenience method for frequency conversion and resampling of data frame. 
              Object must have a DatetimeIndex. After re-sampling, this methods interpolate the time magnitude sum 
              acceleration values and the x,y,z values of the data frame acceleration
  
              :param data_frame: the data frame to resample
              :type data_frame: pandas.DataFrame
              :return: the resampled data frame
              :rtype: pandas.DataFrame