code: def _process_batch(self, param, dataframe):
          
          now = time.time()
          if param.eval_metric is not None:
              metrics = dict(param.eval_metric.get_name_value())
              param.eval_metric.reset()
          else:
              metrics = {}
          # #11504
          try:
              speed = self.frequent / (now - self.last_time)
          except ZeroDivisionError:
              speed = float('inf')
          metrics['batches_per_sec'] = speed * self.batch_size
          metrics['records_per_sec'] = speed
          metrics['elapsed'] = self.elapsed()
          metrics['minibatch_count'] = param.nbatch
          metrics['epoch'] = param.epoch
          self.append_metrics(metrics, dataframe)
          self.last_time = now
docs: Update parameters for selected dataframe after a completed batch
          Parameters
          ----------
          dataframe : pandas.DataFrame
              Selected dataframe needs to be modified.