Skip to content

Commit

Permalink
combineByKey examples and notes added
Browse files Browse the repository at this point in the history
  • Loading branch information
pyspark-in-action committed Apr 20, 2016
1 parent b4e492e commit 985c095
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tutorial/combine-by-key/spark-combineByKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ Finally, we may use the ````collectAsMap()```` method to return the average-by-k
as a dictionary.

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

````
data = [("A", 2.), ("A", 4.), ("A", 9.),
data = [
("A", 2.), ("A", 4.), ("A", 9.),
("B", 10.), ("B", 20.),
("Z", 3.), ("Z", 5.), ("Z", 8.), ("Z", 12.)
]
Expand Down

0 comments on commit 985c095

Please sign in to comment.