'Add the contents of a Dict to summary table
Parameters
d : dict
Keys and values are automatically coerced to strings with str().
Users are encouraged to format them before using add_dict.
ncols: int
Number of columns of the output table
align : string
Data alignment (l/c/r)'

def add_dict(self, d, ncols=2, align='l', float_format='%.4f'):

    keys = [_formatter(x, float_format) for x in iterkeys(d)]
    vals = [_formatter(x, float_format) for x in itervalues(d)]
    data = np.array(lzip(keys, vals))
    if ((data.shape[0] % ncols) != 0):
        pad = (ncols - (data.shape[0] % ncols))
        data = np.vstack([data, np.array((pad * [['', '']]))])
    data = np.split(data, ncols)
    data = reduce((lambda x, y: np.hstack([x, y])), data)
    self.add_array(data, align=align)
