def compute_up(t, df, scope=None, **kwargs): subexpression = common_subexpression(*t.children) scope = merge_dicts(scope or {}, {subexpression: df}) children = [ compute(_child, scope, return_type='native') for _child in t.children ] return pd.concat(children, axis=1)
def compute_one(t, df, scope=None, **kwargs): subexpression = common_subexpression(*t.children) scope = merge_dicts(scope or {}, {subexpression: df}) children = [compute(child, scope) for child in t.children] return pd.concat(children, axis=1)