'Add a key, value pair.'

def add(self, key, val):

    if self.unique:
        if (key in self.data):
            raise ValueError(u'Cannot    add    duplicate    value    "{0}"    in    a    unique    index'.format(key))
        self.data[key] = val
    else:
        rows = self.data.set_default(key, [])
        rows.insert(np.searchsorted(rows, val), val)
