(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
Retrieve a specific `~.BoundColumn` object.
Retrieve a specific ~ . BoundColumn object .
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 StopIteration:
                raise IndexError
        elif isinstance(index, str):
            for column in self.iterall():
                if column.name == index:
                    return column
            raise KeyError(
                "Column with name '{}' does not exist; choices are: {}".format(index, self.names())
            )
        else:
            raise TypeError(
                "Column indices must be integers or str, not {}".format(type(index).__name__)
            )
def __getitem__ ( self , index ) : if isinstance ( index , int ) : try : return next ( islice ( self . iterall ( ) , index , index + 1 ) ) except StopIteration : raise IndexError elif isinstance ( index , str ) : for column in self . iterall ( ) : if column . name == index : return column raise KeyError ( "Column with name '{}' does not exist; choices are: {}" . format ( index , self . names ( ) ) ) else : raise TypeError ( "Column indices must be integers or str, not {}" . format ( type ( index ) . __name__ ) )