(self, data, keys=None, group_by=None)
Return tuple of row key and formatted row
Return tuple of row key and formatted row
Return tuple of row key and formatted row
def format_rows(self, data, keys=None, group_by=None):
        """
        Return tuple of row key and formatted row
        """
        if keys is not None and group_by:
            for key_group in keys:
                row_key = self._row_key(group_by, key_group)
                row = data.get(row_key, None)
                if not row:
                    row = dict(zip(group_by, key_group))

                formatted_row = self._format.format_row(row)
                if self.filter_row(row_key, formatted_row):
                    yield row_key, formatted_row
        else:
            for key, row in data.items():
                formatted_row = self._format.format_row(row)
                if self.filter_row(key, formatted_row):
                    yield key, formatted_row
def format_rows ( self , data , keys = None , group_by = None ) : if keys is not None and group_by : for key_group in keys : row_key = self . _row_key ( group_by , key_group ) row = data . get ( row_key , None ) if not row : row = dict ( zip ( group_by , key_group ) ) formatted_row = self . _format . format_row ( row ) if self . filter_row ( row_key , formatted_row ) : yield row_key , formatted_row else : for key , row in data . items ( ) : formatted_row = self . _format . format_row ( row ) if self . filter_row ( key , formatted_row ) : yield key , formatted_row