code: def kinesia_scores(self, data_frame):
          
          # tap_timestamps = data_frame.td[data_frame.action_type == 1]
          # grouped = tap_timestamps.groupby(pd.TimeGrouper('30u'))
          # return np.mean(grouped.size().values)
          ks = sum(data_frame.action_type == 1)
          duration = math.ceil(data_frame.td[-1])
          return ks, duration
docs: This method calculates the number of key taps
  
              :param data_frame: the data frame
              :type data_frame: pandas.DataFrame
              :return ks: key taps
              :rtype ks: float
              :return duration: test duration (seconds)
              :rtype duration: float