def __setitem__(self, item, value):
        """
            This will set a row if item is an int or set the values of a column
        :param item: int or str of the row or column to set
        :param value: func or obj or list if it is a list then assign each row
            from this list
        :return: None
        """
        if isinstance(item, int):
            self.table[item] = self._normalize_row(value)
        else:
            assert self.key_on
            if not isinstance(item, (tuple, list)):
                item = [item]

            for i, row in enumerate(self.table):
                key = [row[k] for k in self.key_on]
                if key == list(item):
                    self.table[i] = value
                    return

            row = self.append(value)
            for i, key in enumerate(self.key_on):
                row[key] = item[i]
def __setitem__ ( self , item , value ) : if isinstance ( item , int ) : self . table [ item ] = self . _normalize_row ( value ) else : assert self . key_on if not isinstance ( item , ( tuple , list ) ) : item = [ item ] for i , row in enumerate ( self . table ) : key = [ row [ k ] for k in self . key_on ] if key == list ( item ) : self . table [ i ] = value return row = self . append ( value ) for i , key in enumerate ( self . key_on ) : row [ key ] = item [ i ]
This will set a row if item is an int or set the values of a column
        :param item: int or str of the row or column to set
        :param value: func or obj or list if it is a list then assign each row
            from this list
        :return: None