def top(self, amount):
        "Iterates over the top rows specified by amount."
        if amount == -1:
            amount = len(self.__data_area)
        elif 0 <= amount < 1:
            amount = round(amount * len(self.__data_area))
        assert isinstance(amount, int), 'Amount was not understood!'
        for row, count in zip(self, range(amount + 1)):
            yield row
Iterates over the top rows specified by amount.
recipes/Python/577825_Rudimentary_Database_Engine/recipe-577825.py