'Packages Dataset into lists of dictionaries for transmission.'

def _package(self, dicts=True, ordered=True):

    _data = list(self._data)
    if ordered:
        dict_pack = OrderedDict
    else:
        dict_pack = dict
    if self._formatters:
        for (row_i, row) in enumerate(_data):
            for (col, callback) in self._formatters:
                try:
                    if (col is None):
                        for (j, c) in enumerate(row):
                            _data[row_i][j] = callback(c)
                    else:
                        _data[row_i][col] = callback(row[col])
                except IndexError:
                    raise InvalidDatasetIndex
    if self.headers:
        if dicts:
            data = [dict_pack(list(zip(self.headers, data_row))) for data_row in _data]
        else:
            data = ([list(self.headers)] + list(_data))
    else:
        data = [list(row) for row in _data]
    return data
