code: def _get_num_similar_rows(self, row, until=None):
          
          return len(list(filter(lambda r: row == r, self.dataset[:until])))
docs: Get the number of rows similar to row which precede the index `until`