Skip to content

Commit acb99bf

Browse files
committed
Revert " Added example for bag groupby and foldby as requested in issue 46"
This reverts commit 589c5a4.
1 parent 589c5a4 commit acb99bf

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

bag.ipynb

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -138,26 +138,6 @@
138138
"b.count().compute() # Count total number of records"
139139
]
140140
},
141-
{
142-
"cell_type": "code",
143-
"execution_count": null,
144-
"metadata": {},
145-
"outputs": [],
146-
"source": [
147-
"\n",
148-
"(b.groupby(lambda record:record[\"occupation\"]).map(lambda kv: ( kv[0], len(kv[1]))).compute()[:10]) # using groupby to count people in each occupation"
149-
]
150-
},
151-
{
152-
"cell_type": "code",
153-
"execution_count": null,
154-
"metadata": {},
155-
"outputs": [],
156-
"source": [
157-
"city_counts = b.foldby(key = lambda record:record[\"address\"][\"city\"], binop = lambda acc, record:acc + 1, initial = 0 ) # using foldby to count people living by city\n",
158-
"city_counts.take(10)"
159-
]
160-
},
161141
{
162142
"cell_type": "markdown",
163143
"metadata": {},
@@ -315,7 +295,7 @@
315295
"name": "python",
316296
"nbconvert_exporter": "python",
317297
"pygments_lexer": "ipython3",
318-
"version": "3.12.3"
298+
"version": "3.9.12"
319299
}
320300
},
321301
"nbformat": 4,

0 commit comments

Comments
 (0)