Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- load antonio.transform["Filter_Sample"] as M
- # nodeType=transform
- # name=test
- # description=Transform values
- yield "drzava","IGO","Sum of all years","2x 1961","1961 to 1962 ratio","larger of 1961 and 1962"
- f1 = Transform("r[0]", "r")
- f2 = Transform("Sum(Slice(r, 1, NULL))", "r")
- f3 = Transform("Mul(2, r[19])", "r")
- f4 = Transform("(Div(r[19], r[20])) if (r[20] != 0) else (NULL)", "r")
- f5 = Transform("(r[19]) if (r[19] > r[20]) else (r[20])", "r")
- for row in M.rows:
- c0 = Slice(row, 0, 1)
- c1 = f1(row)
- c2 = f2(row)
- c3 = f3(row)
- c4 = f4(row)
- c5 = f5(row)
- yield c0, c1, c2, c3, c4, c5
- layout 1, 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement