def __getitem__(self, index):
        """
        Retrieve a specific `BoundColumn` object.

        *index* can either be 0-indexed or the name of a column

        .. code-block:: python

            columns['speed']  # returns a bound column with name 'speed'
            columns[0]        # returns the first column
        """
        if isinstance(index, int):
            try:
                return next(islice(self.iterall(), index, index + 1))
            except __HOLE__:
                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__)
dataset/ETHPy150Open bradleyayers/django-tables2/django_tables2/columns/base.py/BoundColumns.__getitem__