def iterrows(self, workbook=None):
        """
        Yield rows as lists of data.

        The data is exactly as it is in the source pandas DataFrames and
        any formulas are not resolved.
        """
        resolved_tables = []
        max_height = 0
        max_width = 0

        # while yielding rows __formula_values is updated with any formula values set on Expressions
        self.__formula_values = {}

        for name, (table, (row, col)) in list(self.__tables.items()):
            # get the resolved 2d data array from the table
            #
            # expressions with no explicit table will use None when calling
            # get_table/get_table_pos, which should return the current table.
            #
            self.__tables[None] = (table, (row, col))
            data = table.get_data(workbook, row, col, self.__formula_values)
            del self.__tables[None]

            height, width = data.shape
            upper_left = (row, col)
            lower_right = (row + height - 1, col + width - 1)

            max_height = max(max_height, lower_right[0] + 1)
            max_width = max(max_width, lower_right[1] + 1)
            
            resolved_tables.append((name, data, upper_left, lower_right))

        for row, col in self.__values.keys():
            max_width = max(max_width, row+1)
            max_height = max(max_height, col+1)

        # Build the whole table up-front. Doing it row by row is too slow.
        table = [[None] * max_width for i in range(max_height)]
        for name, data, upper_left, lower_right in resolved_tables:
            for i, r in enumerate(range(upper_left[0], lower_right[0]+1)):
                for j, c in enumerate(range(upper_left[1], lower_right[1]+1)):
                    table[r][c] = data[i][j]

        for (r, c), value in self.__values.items():
            if isinstance(value, Value):
                value = value.value
            if isinstance(value, Expression):
                if value.has_value:
                    self.__formula_values[(r, c)] = value.value
                value = value.get_formula(workbook, r, c)
            table[r][c] = value

        for row in table:
            yield row
def iterrows ( self , workbook = None ) : resolved_tables = [ ] max_height = 0 max_width = 0 self . __formula_values = { } for name , ( table , ( row , col ) ) in list ( self . __tables . items ( ) ) : self . __tables [ None ] = ( table , ( row , col ) ) data = table . get_data ( workbook , row , col , self . __formula_values ) del self . __tables [ None ] height , width = data . shape upper_left = ( row , col ) lower_right = ( row + height - 1 , col + width - 1 ) max_height = max ( max_height , lower_right [ 0 ] + 1 ) max_width = max ( max_width , lower_right [ 1 ] + 1 ) resolved_tables . append ( ( name , data , upper_left , lower_right ) ) for row , col in self . __values . keys ( ) : max_width = max ( max_width , row + 1 ) max_height = max ( max_height , col + 1 ) table = [ [ None ] * max_width for i in range ( max_height ) ] for name , data , upper_left , lower_right in resolved_tables : for i , r in enumerate ( range ( upper_left [ 0 ] , lower_right [ 0 ] + 1 ) ) : for j , c in enumerate ( range ( upper_left [ 1 ] , lower_right [ 1 ] + 1 ) ) : table [ r ] [ c ] = data [ i ] [ j ] for ( r , c ) , value in self . __values . items ( ) : if isinstance ( value , Value ) : value = value . value if isinstance ( value , Expression ) : if value . has_value : self . __formula_values [ ( r , c ) ] = value . value value = value . get_formula ( workbook , r , c ) table [ r ] [ c ] = value for row in table : yield row
Yield rows as lists of data.

        The data is exactly as it is in the source pandas DataFrames and
        any formulas are not resolved.