def __getitem__(self, index):
        if isinstance(index, int):
            try:
                return next(islice(self.iterall(), index, index + 1))
            except StopIteration:
                raise IndexError
        elif isinstance(index, six.string_types):
            for column in self.iterall():
                if column.name == index:
                    return column
            raise KeyError("Column with name '%s' does not exist; "
                           "choices are: %s" % (index, self.names()))
        else:
            raise TypeError('Column indices must be integers or str, not %s'
                            % type(index).__name__)
Retrieve a specific `BoundColumn` object.
dataset/ETHPy150Open bradleyayers/django-tables2/django_tables2/columns/base.py/BoundColumns.__getitem__