def __setitem__(self, key, value):
        """Update a row, or a column, or multiple rows by slicing.

        Parameters
        ----------
        key : int, slice, str
            If key is an `int`, updates a row.
            If key is an `str`, appends `column` to the list with header as
            `key`.
            If key is a slice object, updates multiple rows according to slice
            rules.

        Raises
        ------
        TypeError
            If key is not of type int, slice or str.
        IndexError
            If `int` key is out of range.
        """
        if isinstance(key, (int, slice)):
            self.update_row(key, value)
        elif isinstance(key, basestring):
            self.update_column(key, value)
        else:
            raise TypeError(("table indices must be integers, strings or "
                             "slices, not {}").format(type(key).__name__))
def __setitem__ ( self , key , value ) : if isinstance ( key , ( int , slice ) ) : self . update_row ( key , value ) elif isinstance ( key , basestring ) : self . update_column ( key , value ) else : raise TypeError ( ( "table indices must be integers, strings or " "slices, not {}" ) . format ( type ( key ) . __name__ ) )
Update a row, or a column, or multiple rows by slicing.

        Parameters
        ----------
        key : int, slice, str
            If key is an `int`, updates a row.
            If key is an `str`, appends `column` to the list with header as
            `key`.
            If key is a slice object, updates multiple rows according to slice
            rules.

        Raises
        ------
        TypeError
            If key is not of type int, slice or str.
        IndexError
            If `int` key is out of range.