h2o-py/h2o/frame.py
def apply(self, fun=None, axis=0):
        """
        Apply a lambda expression to an H2OFrame.

        :param fun: a lambda expression to be applied per row or per column.
        :param axis: 0 = apply to each column; 1 = apply to each row
        :returns: a new H2OFrame with the results of applying ``fun`` to the current frame.
        """
        from .astfun import lambda_to_expr
        assert_is_type(axis, 0, 1)
        assert_is_type(fun, FunctionType)
        assert_satisfies(fun, fun.__name__ == "<lambda>")
        res = lambda_to_expr(fun)
        return H2OFrame._expr(expr=ExprNode("apply", self, 1 + (axis == 0), *res))
def apply(self, fun=None, axis=0):
        from .astfun import lambda_to_expr
        assert_is_type(axis, 0, 1)
        assert_is_type(fun, FunctionType)
        assert_satisfies(fun, fun.__name__ == "<lambda>")
        res = lambda_to_expr(fun)
        return H2OFrame._expr(expr=ExprNode("apply", self, 1 + (axis == 0), *res))
def apply ( self , fun = None , axis = 0 ) : from . astfun import lambda_to_expr assert_is_type ( axis , 0 , 1 ) assert_is_type ( fun , FunctionType ) assert_satisfies ( fun , fun . __name__ == "<lambda>" ) res = lambda_to_expr ( fun ) return H2OFrame . _expr ( expr = ExprNode ( "apply" , self , 1 + ( axis == 0 ) , * res ) )
Apply a lambda expression to an H2OFrame.

        :param fun: a lambda expression to be applied per row or per column.
        :param axis: 0 = apply to each column; 1 = apply to each row
        :returns: a new H2OFrame with the results of applying ``fun`` to the current frame.
Apply a lambda expression to an H2OFrame .