h2o-py/h2o/frame.py
def pop(self, i):
        """
        Pop a column from the H2OFrame at index i.

        :param i: The index (int) or name (str) of the column to pop.
        :returns: an H2OFrame containing the column dropped from the current frame; the current frame is modified
            in-place and loses the column.
        """
        if is_type(i, str): i = self.names.index(i)
        col = H2OFrame._expr(expr=ExprNode("cols", self, i))
        old_cache = self._ex._cache
        self._ex = ExprNode("cols", self, -(i + 1))
        self._ex._cache.ncols -= 1
        self._ex._cache.names = old_cache.names[:i] + old_cache.names[i + 1:]
        self._ex._cache.types = {name: old_cache.types[name] for name in self._ex._cache.names}
        self._ex._cache._data = None
        col._ex._cache.ncols = 1
        col._ex._cache.names = [old_cache.names[i]]
        return col
def pop(self, i):
        if is_type(i, str): i = self.names.index(i)
        col = H2OFrame._expr(expr=ExprNode("cols", self, i))
        old_cache = self._ex._cache
        self._ex = ExprNode("cols", self, -(i + 1))
        self._ex._cache.ncols -= 1
        self._ex._cache.names = old_cache.names[:i] + old_cache.names[i + 1:]
        self._ex._cache.types = {name: old_cache.types[name] for name in self._ex._cache.names}
        self._ex._cache._data = None
        col._ex._cache.ncols = 1
        col._ex._cache.names = [old_cache.names[i]]
        return col
def pop ( self , i ) : if is_type ( i , str ) : i = self . names . index ( i ) col = H2OFrame . _expr ( expr = ExprNode ( "cols" , self , i ) ) old_cache = self . _ex . _cache self . _ex = ExprNode ( "cols" , self , - ( i + 1 ) ) self . _ex . _cache . ncols -= 1 self . _ex . _cache . names = old_cache . names [ : i ] + old_cache . names [ i + 1 : ] self . _ex . _cache . types = { name : old_cache . types [ name ] for name in self . _ex . _cache . names } self . _ex . _cache . _data = None col . _ex . _cache . ncols = 1 col . _ex . _cache . names = [ old_cache . names [ i ] ] return col
Pop a column from the H2OFrame at index i.

        :param i: The index (int) or name (str) of the column to pop.
        :returns: an H2OFrame containing the column dropped from the current frame; the current frame is modified
            in-place and loses the column.
Pop a column from the H2OFrame at index i .