Created
December 11, 2014 23:46
-
-
Save gregology/97cf4cb7ac973ac62e2e to your computer and use it in GitHub Desktop.
Revisions
-
gregology created this gist
Dec 11, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ foo = sc.records([{'foo': 123}, {'foo': 321}]) bar = sc.records([{'bar': 123}, {'bar': 321}]) baz = sc.records([{'baz': 123}, {'baz': 321}]) qux = foo.cartesian(bar)\ .map(lambda (x,y): x.merge(y))\ .cartesian(baz)\ .map(lambda (x,y): x.merge(y)) qux.collect()