Skip to content

Commit 985c095

Browse files
combineByKey examples and notes added
1 parent b4e492e commit 985c095

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tutorial/combine-by-key/spark-combineByKey.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ Finally, we may use the ````collectAsMap()```` method to return the average-by-k
7272
as a dictionary.
7373

7474
````
75-
data = [(A, 2.), (A, 4.), (A, 9.),
75+
data = [
76+
(A, 2.), (A, 4.), (A, 9.),
7677
(B, 10.), (B, 20.),
7778
(Z, 3.), (Z, 5.), (Z, 8.), (Z, 12.)
7879
]
@@ -161,7 +162,8 @@ Let's break up the data into 2 partitions (just as an example)
161162
and see it in action:
162163

163164
````
164-
data = [("A", 2.), ("A", 4.), ("A", 9.),
165+
data = [
166+
("A", 2.), ("A", 4.), ("A", 9.),
165167
("B", 10.), ("B", 20.),
166168
("Z", 3.), ("Z", 5.), ("Z", 8.), ("Z", 12.)
167169
]

0 commit comments

Comments
 (0)