@utils.allow_tableset_proxy
def distinct(self, key=None):
    key_is_row_function = hasattr(key, '__call__')
    key_is_sequence = utils.issequence(key)

    uniques = []
    rows = []

    if self._row_names is not None:
        row_names = []
    else:
        row_names = None

    for i, row in enumerate(self._rows):
        if key_is_row_function:
            k = key(row)
        elif key_is_sequence:
            k = (row[j] for j in key)
        elif key is None:
            k = tuple(row)
        else:
            k = row[key]

        if k not in uniques:
            uniques.append(k)
            rows.append(row)

            if self._row_names is not None:
                row_names.append(self._row_names[i])

    return self._fork(rows, row_names=row_names)
Create a new table with only unique rows.
dataset/ETHPy150Open wireservice/agate/agate/table/distinct.py/distinct